:root {
    --primary-color: #35a763;
    --primary-dark: #285540;
    --text-color: #000000;
    --text-light: #ffffff;
    --bg-light: #f4f4f4;
    --bg-dark: #051e22;
    --gray-100: #d9d9d9;
    --gray-200: #8a8a8a;
    --font-main: 'Liberation Sans', sans-serif;
    --container-width: 1320px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-main), serif;
    color: var(--text-color);
    overflow-x: hidden;
    background: var(--bg-light) url("/img/bkg.png") no-repeat center top;
    background-size: 100% auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

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

.btn-outline {
    border: 1px solid var(--primary-dark);
    color: #fff;
}

.btn-sm {
    padding: 10px 20px;
    font-size: clamp(13px, 0.88vw, 17px);
}

.header-section {
    padding: 24px 0;
    background: transparent;
    position: relative;
    z-index: 10;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 68px;
    height: 68px;
    background-image: url("/img/logo.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-image {
    width: 164px;
    height: auto;
}

.main-nav ul {
    display: flex;
    gap: clamp(22px, 1.8vw, 44px);
}

.main-nav a {
    font-size: clamp(16px, 1vw, 18px);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
}

.header-user-panel {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(40, 85, 64, 0.18);
    backdrop-filter: blur(4px);
}

.header-user-name {
    font-size: clamp(14px, 0.75vw, 18px);
    font-weight: 700;
    color: #10382f;
    white-space: nowrap;
}

.header-cabinet-btn {
    border: 1px solid #285540;
    color: #ffffff;
    background: linear-gradient(90deg, #10352c 0%, #2f6f52 100%);
    font-weight: 600;
    padding: 6px 13px;
    font-size: clamp(9px, 0.56vw, 11px);
}

.header-guest-start-btn {
    border: 1px solid #c3cad3;
    color: #4b5563;
    background: #eef1f4;
    font-weight: 600;
    padding: 6px 13px;
    font-size: clamp(9px, 0.56vw, 11px);
}

a.header-cabinet-btn,
a.header-guest-start-btn {
    text-decoration: none;
}

.header-logout-btn {
    border: 1px solid #c3cad3;
    color: #4b5563;
    background: #eef1f4;
    font-weight: 600;
}

.header-logout-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.header-cabinet-btn:hover {
    filter: brightness(1.04);
}

.header-logout-btn:hover,
.header-guest-start-btn:hover {
    background: #e3e8ee;
    color: #374151;
}

.header-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 54px;
    width: auto;
    padding: 7px 11px;
}

.site-footer {
    background: linear-gradient(90deg, #051e22 0%, #1c4936 100%);
    color: white;
    padding: 48px 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 26px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand-text {
    font-size: 21px;
    letter-spacing: 0.6px;
    color: #ffffff;
    line-height: 1;
}

.tagline-sm {
    font-size: clamp(12px, 0.9vw, 16px);
    color: #f3f3f3;
}

.footer-links-group a,
.footer-col a {
    color: #d8d8d8;
    font-size: 12px;
    text-decoration: none;
}

.footer-links-group a:hover,
.footer-col a:hover {
    color: white;
}

.footer-col h4 {
    margin: 0 0 4px;
    font-size: 13px;
    text-decoration: underline;
    color: #fff;
}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-cta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.footer-login {
    background: transparent;
    border: 1px solid #d1d1d1;
    color: #fff;
    min-width: 78px;
}

.footer-start {
    color: #fff;
    text-decoration: none;
    padding-left: 6px;
    padding-right: 6px;
}

@media (min-width: 1600px) {
    :root {
        --container-width: 1560px;
    }

    .header-section {
        padding: 28px 0;
    }
}

@media (max-width: 1366px) and (min-width: 1201px) {
    .site-header {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
        gap: 26px;
    }

    .header-actions {
        margin-left: auto;
    }
}

@media (max-width: 1200px) {
    .header-user-panel {
        justify-content: center;
    }
}

@media (min-width: 993px) {
    .header-actions {
        font-size: 15px;
    }

    .btn-sm {
        font-size: 17px;
    }

    .header-user-name {
        font-size: 15px;
    }

    .header-cabinet-btn,
    .header-guest-start-btn {
        font-size: 11px;
        min-height: 34px;
    }

    .header-logout-btn {
        min-width: 54px;
        width: auto;
        height: 34px;
    }
}

@media (max-width: 1200px) and (min-width: 993px) {
    .header-section {
        padding: 18px 0;
    }

    .site-header {
        flex-wrap: wrap;
        row-gap: 14px;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
        gap: 24px;
    }

    .main-nav a {
        font-size: 17px;
    }

    .header-actions {
        margin-left: auto;
    }
}

@media (max-width: 992px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .container,
    .site-header {
        min-width: 0;
    }

    .site-header > * {
        min-width: 0;
    }

    .site-header {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
}
