.topbar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-logo-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}

.lang-btn,
.theme-btn {
    box-sizing: border-box;
    height: 34px;
}

.lang-btn {
    padding: 0 8px;
    gap: 0;
}

.theme-btn {
    width: 38px;
    padding: 0;
    border: 2px solid var(--brown);
    border-radius: 8px;
    background: var(--white);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.theme-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-icon-sun {
    display: none;
}

.theme-btn:hover {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.lang-btn:focus-visible,
.theme-btn:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] body {
    background: #1a1410;
    color: #f4eee9;
}

html[data-theme="dark"] .topbar {
    background: #241c17;
    color: #f4eee9;
    border-bottom-color: #3d3028;
}

html[data-theme="dark"] .lang-btn,
html[data-theme="dark"] .theme-btn {
    background: #2a211c;
    color: #f4eee9;
    border-color: #c4a08e;
}

html[data-theme="dark"] .lang-btn.is-active {
    background: var(--brown);
    color: var(--white);
    border-color: var(--brown);
}

html[data-theme="dark"] .lang-btn:hover,
html[data-theme="dark"] .lang-btn.is-active:hover,
html[data-theme="dark"] .theme-btn:hover {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

html[data-theme="dark"] section:not(.hero),
html[data-theme="dark"] .content-block,
html[data-theme="dark"] .sidebar-block {
    background: #2a211c;
    color: #f4eee9;
}

html[data-theme="dark"] .section-one,
html[data-theme="dark"] .section-two,
html[data-theme="dark"] .section-three,
html[data-theme="dark"] .section-four,
html[data-theme="dark"] .section-five,
html[data-theme="dark"] .highlights-section {
    background-color: #32261f !important;
    color: #f4eee9;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .level-card,
html[data-theme="dark"] .text-card,
html[data-theme="dark"] .number-card {
    background: #3a2d26;
    color: #f4eee9;
    border-color: rgba(224, 194, 176, 0.35);
}

html[data-theme="dark"] .level-card h3,
html[data-theme="dark"] .text-card h3,
html[data-theme="dark"] .number-card h3,
html[data-theme="dark"] .gallery-levels .card-title,
html[data-theme="dark"] .number-card .level-figure,
html[data-theme="dark"] .level-grid .level-card,
html[data-theme="dark"] .level-grid .level-card:visited {
    color: #f4eee9;
}

html[data-theme="dark"] .level-card .level-panel p,
html[data-theme="dark"] .text-card p,
html[data-theme="dark"] .highlight-subtitle,
html[data-theme="dark"] .content-block p,
html[data-theme="dark"] .contact-info p {
    color: #d9cdc4;
}

html[data-theme="dark"] section:not(.hero) h2,
html[data-theme="dark"] .content-block h2,
html[data-theme="dark"] .sidebar-block h3,
html[data-theme="dark"] .footer-col h3,
html[data-theme="dark"] .level-link,
html[data-theme="dark"] header nav a:hover,
html[data-theme="dark"] .footer-col ul li a:hover,
html[data-theme="dark"] .sidebar-list a:hover {
    color: #e07068;
}

html[data-theme="dark"] .level-label,
html[data-theme="dark"] .sidebar-list a,
html[data-theme="dark"] .contact-info h3,
html[data-theme="dark"] .form-field label {
    color: #e0c2b0;
}

html[data-theme="dark"] h3[style*="--brown"] {
    color: #e0c2b0 !important;
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
    background: #1a1410;
    color: #f4eee9;
    border-color: #c4a08e;
}

html[data-theme="dark"] .contact-form input:focus,
html[data-theme="dark"] .contact-form textarea:focus {
    border-color: #e07068;
    outline-color: #e07068;
}

html[data-theme="dark"] .field-optional {
    color: #b5a59b;
}

html[data-theme="dark"] .form-field.is-invalid input,
html[data-theme="dark"] .form-field.is-invalid textarea {
    border-color: #e07068;
    background: #2a1614;
}

html[data-theme="dark"] .field-error {
    color: #f3b4b4;
}

html[data-theme="dark"] .contact-form button:focus-visible {
    outline-color: #e07068;
}

html[data-theme="dark"] #myDiv {
    border-color: #4a382e !important;
}

html[data-theme="dark"] header,
html[data-theme="dark"] footer,
html[data-theme="dark"] .visitor-bar {
    background: #000000;
    color: #ffffff;
}

html[data-theme="dark"] section.hero,
html[data-theme="dark"] section.hero h2,
html[data-theme="dark"] .hero-copy p,
html[data-theme="dark"] .hero-btn {
    color: #ffffff;
}

.form-status {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}

.form-status-ok {
    background: #e7f6ea;
    color: #1e6b32;
}

.form-status-error {
    background: #fdecea;
    color: #9b2c2c;
}

html[data-theme="dark"] .form-status-ok {
    background: #163322;
    color: #b7ebc6;
}

html[data-theme="dark"] .form-status-error {
    background: #3a1818;
    color: #f3b4b4;
}

.contact-form {
    display: grid;
    gap: 16px;
    align-content: start;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.form-field-half {
    width: 100%;
    max-width: 28rem;
}

.form-field label {
    font-size: 15px;
    font-weight: 600;
    color: var(--brown);
}

.field-optional {
    font-weight: 400;
    color: #6d5c52;
}

.contact-form input,
.contact-form textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 2px solid #c4b2a6;
    border-radius: 8px;
    background: #fffdfb;
    color: var(--black);
    font: inherit;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--red);
    outline: 2px solid var(--red);
    outline-offset: 1px;
}

.form-field.is-invalid input,
.form-field.is-invalid textarea {
    border-color: #9b2c2c;
    background: #fff8f7;
}

.field-error {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #9b2c2c;
}

.contact-form button {
    justify-self: start;
    min-width: 11rem;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    background: var(--red);
    color: var(--white);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-form button:hover {
    background: var(--brown);
}

.contact-form button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.contact-form button:disabled {
    cursor: wait;
    opacity: 0.75;
}

@media (max-width: 600px) {
    .contact-form button {
        width: 100%;
    }
}

header nav .nav-drop {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

header nav .nav-drop > a {
    margin-left: 0;
}

.nav-drop-toggle {
    margin-left: 4px;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.nav-drop-toggle svg {
    display: block;
    width: 12px;
    height: 12px;
}

.nav-drop-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    padding: 8px 0;
    background: #111111;
    border: 1px solid var(--brown);
    border-radius: 8px;
    z-index: 30;
}

.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu {
    display: block;
}

header nav .nav-drop-menu a {
    display: block;
    margin: 0;
    padding: 8px 16px;
    color: #ffffff;
    white-space: nowrap;
}

header nav .nav-drop-menu a:hover {
    color: var(--red);
}

@media (max-width: 980px) {
    header nav .nav-drop {
        margin-left: 0;
    }
}
