/* =========================================================
   GLOBAL TYPOGRAPHY
========================================================= */

:root {
    --font-primary: "Manrope", Arial, sans-serif;
    --font-heading: "Cormorant Garamond", Georgia, serif;
}

html,
body {
    font-family: var(--font-primary);
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}
:root {
    --header-bg: rgba(8, 12, 18, 0.96);
    --header-bg-solid: #070b12;
    --header-text: #f5f5f5;
    --header-muted: rgba(255, 255, 255, 0.75);
    --header-accent: #d4af59;
    --header-accent-strong: #c79b42;
    --header-border: rgba(255, 255, 255, 0.1);
    --header-shadow: rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
a {
    font: inherit;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(8, 15, 26, 0.45);
    backdrop-filter: blur(6px);
    border-bottom: none;
    z-index: 20;
}

.header-shell {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 82px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    text-decoration: none;
    color: var(--header-text);
    line-height: 0;
    height: 100%;
}

.brand-logo {
    display: block;
    width: 212px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
}

.main-nav {
    display: flex;
    justify-content: center;
    text-transform: uppercase;
}

.main-nav ul,
.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    height: 100%;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 12px;
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.91rem;
    font-weight: 600;
    transition: color 0.25s ease;
    border-radius: 8px;
    line-height: 1.2;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 1px;
    background: var(--header-accent);
    transition: width 0.28s ease, left 0.28s ease, opacity 0.28s ease;
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .nav-link:hover,
    .nav-link:focus-visible {
        color: var(--header-accent);
        outline: none;
    }

    .nav-link:hover::after,
    .nav-link:focus-visible::after {
        left: 18%;
        width: 64%;
        opacity: 1;
    }
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--header-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    justify-self: end;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--header-text);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--header-border);
    background: var(--header-bg-solid);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 24px;
}

.mobile-nav li + li {
    margin-top: 6px;
}

.mobile-nav .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--header-border);
}

.hero-demo {
    position: relative;
    background: url('../images/backgrounds/hero-bg.png') center center / cover no-repeat;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px 42px;
}

.hero-demo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 12, 18, 0.7) 0%, rgba(8, 12, 18, 0.38) 42%, rgba(8, 12, 18, 0.12) 100%);
}

.hero-demo-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    color: #ffffff;
    display: grid;
    gap: 12px;
    padding-top: 8px;
    margin-left: -8px;
}

.hero-demo-inner h1 {
    margin: 0;
    max-width: none;
    font-size: clamp(2.9rem, 3.7vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.hero-demo-inner h1::after {
    content: "!";
}

.hero-demo-inner p {
    margin: 0;
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.8;
}

@media (max-width: 980px) {
    .header-shell {
        grid-template-columns: 1fr auto;
    }

    .brand-logo {
        width: 170px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-demo-inner h1 {
        white-space: normal;
    }
}

@media (max-width: 540px) {
    .header-shell {
        min-height: 72px;
        padding: 0 16px;
    }

    .brand-logo {
        width: 140px;
    }

    .hero-demo {
        min-height: 360px;
        padding: 32px 16px 40px;
    }

    .hero-demo-inner h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }
}

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

    background: rgb(5 15 25 / 89%);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border-bottom: 1px solid rgba(195, 148, 62, 0.18);

    transition:
        background-color 0.3s ease,
        backdrop-filter 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.site-header.is-scrolled {
    background: rgb(7 20 32 / 63%);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(195, 148, 62, 0.42);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.22),
        0 1px 0 rgba(195, 148, 62, 0.08);
}

.site-header .header-nav a {
    color: #ffffff;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.site-header .header-nav a:hover,
.site-header .header-nav a.is-active {
    color: #d4af59;
}
.site-header .site-logo img {
    opacity: 1;
    filter: none;
}
/* =========================================================
   DESKTOP DROPDOWN MENU
========================================================= */

.main-nav .nav-item {
    position: relative;
}

.main-nav .nav-item--has-children {
    padding-bottom: 0;
}

.nav-link__arrow {
    width: 10px;
    height: 7px;
    margin-left: 3px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s ease;
}


/* Dropdown */

.main-nav .nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;

    width: 190px;
    height: auto;

    display: block;

    margin: 0;
    padding: 8px;

    background: rgba(7, 20, 32, 0.98);

    border: 1px solid rgba(195, 148, 62, 0.28);
    border-radius: 8px;

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.28);

    opacity: 0;
    visibility: hidden;

    transform:
        translate(-50%, 8px);

    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s ease;

    z-index: 100;
}


/* Малък невидим мост между Имоти и dropdown */

.main-nav .nav-dropdown::before {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    top: -12px;

    height: 12px;
}


/* Показване */

.main-nav .nav-item--has-children:hover > .nav-dropdown,
.main-nav .nav-item--has-children:focus-within > .nav-dropdown {
    opacity: 1;
    visibility: visible;

    transform:
        translate(-50%, 0);
}


/* Завъртане на стрелката */

.main-nav .nav-item--has-children:hover > .nav-link .nav-link__arrow,
.main-nav .nav-item--has-children:focus-within > .nav-link .nav-link__arrow {
    transform: rotate(180deg);
}


/* Dropdown links */

.main-nav .nav-dropdown__item {
    display: block;
    width: 100%;
}

.main-nav .nav-dropdown__link {
    display: block;

    width: 100%;
    padding: 11px 14px;

    border-radius: 5px;

    color: rgba(255, 255, 255, 0.88);

    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        padding-left 0.2s ease;
}

.main-nav .nav-dropdown__link:hover,
.main-nav .nav-dropdown__link:focus-visible {
    color: #d4af59;

    background:
        rgba(195, 148, 62, 0.08);

    padding-left: 18px;

    outline: none;
}


/* =========================================================
   MOBILE SUBMENU
========================================================= */

.mobile-nav-item__row {
    display: flex;
    align-items: center;
}

.mobile-nav-item__row > .nav-link {
    flex: 1;
}

.mobile-submenu-toggle {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    background: transparent;

    color: #ffffff;

    cursor: pointer;
}

.mobile-submenu-toggle svg {
    width: 12px;
    height: 8px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}

.mobile-submenu-toggle[aria-expanded="true"] {
    color: #d4af59;
}

.mobile-submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;

    margin: 0;
    padding: 4px 0 10px 18px !important;

    border-left: 1px solid rgba(195, 148, 62, 0.3);
}

.mobile-submenu.is-open {
    display: block;
}

.mobile-submenu li {
    margin: 0 !important;
}

.mobile-submenu__link {
    display: block;

    padding: 10px 14px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
    text-transform: uppercase;
}

.mobile-submenu__link:hover {
    color: #d4af59;
}
/* =========================================================
   HEADER CONTACT CTA
========================================================= */

.header-contact-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 44px;
    padding: 0 20px;

    border: 1px solid #c3943e;
    border-radius: 6px;

    color: #ffffff;
    background: rgba(195, 148, 62, 0.06);

    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.header-contact-button svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: #d4af59;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        stroke 0.25s ease,
        transform 0.25s ease;
}

.header-contact-button:hover {
    color: #fff;
    background: linear-gradient(120deg, #e4ba4e, #c88b1c);
    border-color: #c3943e;
    transform: translateY(-1px);
}

.header-contact-button:hover svg {
    stroke: #fff;
    transform: translateX(6px);
}


/* Desktop */

.header-contact-button--desktop {
    justify-self: end;
    white-space: nowrap;
}


/* Mobile CTA по подразбиране е скрит */

.header-contact-button--mobile {
    display: none;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 980px) {

    .header-contact-button--desktop {
        display: none;
    }

    .header-contact-button--mobile {
        display: flex;

        width: calc(100% - 48px);
        margin: 6px 24px 24px;

        min-height: 50px;
    }
}

@media (max-width: 540px) {

    .header-contact-button--mobile {
        width: calc(100% - 32px);
        margin:
            6px
            16px
            20px;
    }
}

/* =========================================================
   ACTIVE NAVIGATION ITEM
========================================================= */

.main-nav .nav-link.is-active,
.mobile-nav .nav-link.is-active {
    color: var(--header-accent);
}

.main-nav .nav-link.is-active::after {
    left: 18%;
    width: 64%;
    opacity: 1;
}

.main-nav .nav-dropdown__link.is-active,
.mobile-submenu__link.is-active {
    color: var(--header-accent);
}

.main-nav .nav-dropdown__link.is-active {
    background: rgba(195, 148, 62, 0.08);
}

.mobile-nav-item:has(.mobile-submenu__link.is-active)
    .mobile-submenu-toggle {
    color: var(--header-accent);
}

