@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

header, nav {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-bottom: 1px solid #ececec;
    width: 100%;
    min-height: 72px;
    height: 72px;
}

.header {
    min-height: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    background: #fff;
    align-items: center;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    min-height: 72px;
    height: 72px;
}

header nav,
header nav ul,
header nav li {
    height: 100%;
}

@media (max-width: 700px) {
    header {
        min-height: 62px;
        height: 62px;
    }
    .header {
        min-height: 62px;
        height: 62px;
    }
    .header .container {
        min-height: 62px;
        height: 62px;
        padding: 0 8px;
    }
    .header-form-btn {
        height: 100%;
    }
}

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    padding: 24px 0 18px 0;
    background: #fffbe9;
    box-shadow: 0 2px 8px rgba(238,189,129,0.10);
    font-size: 2em;
    font-weight: bold;
    color: #222;
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: normal;
    line-height: 1.2;
    text-align: left;
    margin-bottom: 0;
    position: static;
}
.site-logo-img {
    height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
    aspect-ratio: 16/9;
    margin-right: 16px;
}
@media (max-width: 700px) {
    .site-logo {
        font-size: 1.1em;
        padding: 8px 0 2px 0;
    }
    .site-logo-img {
        height: 72px;
        margin-right: 8px;
    }
}

.site-logo-text {
    display: block;
    white-space: nowrap;
}

.header-logo-img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
    margin-right: 16px;
}
@media (max-width: 700px) {
    .header-logo-img {
        min-height: 62px;
        height: 62px;
        margin-right: 8px;
    }
}

.site-logo a {
    color: #222;
    text-decoration: none;
    display: block;
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

nav li {
    height: 100%;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 32px;
    color: #222;
    text-decoration: none;
    font-size: 1em;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    background: transparent;
}

.nav-link.active {
    position: relative;
}

.nav-link:hover {
    position: relative;
    background: #f7e9b7;
    color: #222;
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: #b89c2c;
    border-radius: 2px 2px 0 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    margin-left: auto;
    cursor: pointer;
}

@media (max-width: 900px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 12px;
    }
    nav ul {
        gap: 16px;
    }
}

@media (max-width: 700px) {
    .header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .nav-toggle {
        order: 2;
        margin-left: auto;
        position: relative;
        z-index: 2100;
    }
    .header-logo-img {
        order: 1;
    }
    nav {
        order: 3;
    }
    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2em;
        margin-left: auto;
        cursor: pointer;
        z-index: 2100;
    }
    nav {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        width: 100vw;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        flex-direction: column;
        z-index: 2000;
    }
    nav.open {
        display: flex;
    }
    nav ul {
        flex-direction: column;
        height: auto;
    }
    nav li {
        width: 100%;
        height: auto;
    }
    nav a {
        padding: 16px;
        font-size: 1em;
        border-radius: 0;
        border-bottom: 1px solid #ececec;
        justify-content: flex-start;
    }
    .header-contacts {
        display: none;
    }
    .header-form-btn {
        height: 100%;
        font-size: 1em;
        padding: 0 10px;
    }
    nav.open a {
        background: #fff !important;
    }
    nav.open .nav-link {
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        border-radius: 8px;
        margin: 8px 12px;
        border-bottom: none;
    }
    nav {
        top: 62px;
    }
    nav.open .nav-link {
        margin-top: 12px;
    }
}

@media (max-width: 700px) {
    nav.open .nav-link:hover,
    nav.open .nav-link.active {
        background: #f7e9b7 !important;
        color: #222;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    nav.open .nav-link:hover::after,
    nav.open .nav-link.active::after {
        display: none;
    }
}

.header-contacts {
    height: 100%;
    padding: 0;
    margin: 0 0 0 32px;
    display: flex;
    align-items: stretch;
    gap: 18px;
    white-space: nowrap;
}

.header-phone, .header-email {
    color: #222;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s;
}

.header-phone:hover, .header-email:hover {
    color: #9d6f00;
    text-decoration: underline;
}

.header-contacts a {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-form-btn {
    height: 100%;
    min-height: unset;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 16px;
    margin: 0;
    background: #9d6f00;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.header-form-btn:hover {
    background: #ffe282;
    color: #222;
}

@media (max-width: 900px) {
    .header-contacts {
        margin-left: 0;
        gap: 10px;
    }
    .header-form-btn {
        padding: 0px 10px;
        font-size: 0.95em;
    }
}

@media (max-width: 700px) {
    .header-contacts {
        display: none;
        height: 100%;
    }
    .header-form-btn {
        min-height: 100%;
    }
}

.pencil-icon {
    height: 1em;
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
}