:root {
    --color-primary: #e3c37a;
    --color-text-light: #ffffff;
    --color-text-medium: #b1b1b1;
    --color-background-dark: #232228;
    --font-main: 'Inter', 'Montserrat', sans-serif;
    --font-display: 'Cormorant Garamond', serif
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(35, 34, 40, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(227, 195, 122, 0.18);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    grid-template-areas: "logo nav phone qr mobile";
    align-items: center;
    gap: 28px;
    padding: 14px 70px;
    box-sizing: border-box;
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1), opacity 0.35s ease, padding 0.3s ease, box-shadow 0.3s ease
}

.site-header.header--compact {
    padding-top: 6px;
    padding-bottom: 6px;
    opacity: 0.92;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35)
}

.site-header.header--compact .logo-text {
    font-size: 20px
}

.site-header.header--compact .main-nav a {
    font-size: 16px;
    padding-bottom: 18px
}

.site-header.header--compact .header-phone {
    font-size: 20px
}

.site-header.header--compact .logo-image {
    height: 30px
}

.site-header.header--hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none
}

.page-container {
    padding-top: 72px
}

.site-header .logo-text,
.site-header .main-nav a,
.site-header .header-phone,
.site-header .logo-image {
    transition: font-size 0.3s ease, height 0.3s ease
}

.logo {
    grid-area: logo;
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px
}

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

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain
}

.logo-text {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 400;
    color: var(--color-text-light);
    line-height: 1.4
}

.logo-divider {
    display: inline-block;
    width: 1px;
    height: 15px;
    background-color: var(--color-text-light)
}

.main-nav {
    grid-area: nav;
    justify-self: center
}

.main-nav > ul {
    display: grid;
    grid-template-columns: repeat(6, auto);
    gap: 28px
}

.main-nav a {
    font-family: var(--font-main);
    font-size: 21px;
    color: var(--color-text-medium);
    position: relative;
    padding-bottom: 27px;
    transition: color 0.3s ease
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary)
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-primary)
}

.header-phones {
    grid-area: phone;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-self: end;
    align-items: flex-end
}

.header-phone {
    font-family: var(--font-display);
    font-size: 27px;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease
}

.header-phone:hover {
    color: var(--color-text-light)
}

.header-qr {
    grid-area: qr;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.header-qr-link {
    display: block;
    width: 40px;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(227, 195, 122, 0.3);
    background: rgba(227, 195, 122, 0.1);
    padding: 4px;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none
}

.header-qr-link:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(227, 195, 122, 0.4)
}

.header-qr-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block
}

.header-qr {
    position: relative
}

.header-qr-link::before {
    content: 'WhatsApp';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(35, 34, 40, 0.95);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-main);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(227, 195, 122, 0.3);
    z-index: 1000
}

.header-qr-link:hover::before {
    opacity: 1
}

.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease
}

.qr-modal.show {
    display: flex;
    opacity: 1
}

.qr-modal-content {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 2px solid var(--color-primary);
    position: relative;
    box-sizing: border-box
}

.qr-modal.show .qr-modal-content {
    transform: scale(1)
}

.qr-modal-header {
    margin-bottom: 30px
}

.qr-modal-header h3,
.qr-modal-title {
    font-family: var(--font-display);
    color: var(--color-primary);
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px
}

.qr-modal-header p {
    font-family: var(--font-main);
    color: var(--color-text-medium);
    font-size: 14px;
    margin: 0
}

.qr-modal-qr {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 0 auto 30px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(227, 195, 122, 0.3);
    max-width: 100%;
    box-sizing: border-box
}

.qr-modal-qr img {
    width: 300px;
    height: 300px;
    max-width: 100%;
    height: auto;
    display: block
}

.qr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1
}

.qr-modal-close:hover {
    background: rgba(227, 195, 122, 0.2);
    transform: scale(1.1)
}

.qr-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center
}

.qr-modal-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease
}

.qr-modal-whatsapp-link:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4)
}

@media (max-width:768px) {
    .qr-modal-content {
        padding: 30px 25px;
        max-width: 90%;
        width: 90%
    }

    .qr-modal-qr {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box
    }

    .qr-modal-qr img {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1
    }

    .qr-modal-header h3,
    .qr-modal-title {
        font-size: 24px
    }

    .qr-modal-header p {
        font-size: 13px
    }

    .qr-modal-whatsapp-link {
        width: 100%;
        max-width: 100%;
        justify-content: center
    }
}

@media (max-width:480px) {
    .qr-modal-content {
        padding: 25px 20px;
        max-width: 95%;
        width: 95%
    }

    .qr-modal-qr {
        padding: 12px
    }

    .qr-modal-header h3,
    .qr-modal-title {
        font-size: 20px
    }

    .qr-modal-header p {
        font-size: 12px
    }

    .qr-modal-close {
        width: 35px;
        height: 35px;
        font-size: 28px;
        top: 10px;
        right: 10px
    }

    .qr-modal-whatsapp-link {
        padding: 10px 20px;
        font-size: 14px
    }
}

.mobile-nav-toggle {
    grid-area: mobile;
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 30px;
    height: 30px
}

.hamburger {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-light);
    position: relative;
    transition: all 0.3s ease
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-light);
    transition: all 0.3s ease
}

.hamburger::before {
    top: -8px
}

.hamburger::after {
    top: 8px
}

.mobile-nav-toggle.active .hamburger {
    background-color: transparent
}

.mobile-nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0
}

.mobile-nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(35, 34, 40, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease
}

.mobile-nav-overlay.active {
    display: flex;
    opacity: 1
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative
}

.mobile-nav-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease
}

.mobile-nav-close:hover {
    background-color: rgba(255, 255, 255, 0.1)
}

.mobile-nav-close span {
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--color-text-light);
    transition: all 0.3s ease
}

.mobile-nav-close span:first-child {
    transform: rotate(45deg)
}

.mobile-nav-close span:last-child {
    transform: rotate(-45deg)
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0
}

.mobile-nav-list a,
.mobile-nav-list .mobile-dropdown-toggle {
    font-family: var(--font-main);
    font-size: 26px;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative
}

.mobile-nav-list a:hover,
.mobile-nav-list .mobile-dropdown-toggle:hover {
    color: var(--color-primary)
}

.mobile-nav-list a.active {
    color: var(--color-primary);
    font-weight: 600
}

.mobile-nav-phone {
    margin-top: 50px;
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--color-primary);
    text-align: center
}

@media (min-width:1200px) {
    .site-header {
        gap: 40px
    }

    .main-nav > ul {
        gap: 40px
    }
}

@media (max-width:1199px) and (min-width:993px) {
    .site-header {
        gap: 20px
    }

    .main-nav > ul {
        gap: 20px
    }

    .main-nav a {
        font-size: 20px
    }

    .header-phones {
        gap: 3px
    }

    .header-phone {
        font-size: 26px
    }
}

@media (max-width:992px) {
    .site-header {
        grid-template-columns: auto 1fr auto auto auto;
        grid-template-areas: "logo phone qr mobile";
        gap: 20px;
        padding-left: 50px;
        padding-right: 50px;
        max-width: 100%;
        margin: 0;
        width: 100%
    }

    .main-nav {
        display: none
    }

    .mobile-nav-toggle {
        display: block
    }

    .header-phones {
        justify-self: center;
        align-items: center;
        gap: 3px
    }

    .header-phone {
        font-size: 21px
    }

    .header-qr {
        display: flex
    }
}

@media (max-width:576px) {
    .site-header {
        padding: 15px 20px;
        grid-template-columns: 7fr 3fr;
        grid-template-areas: "logo actions" "phone phone";
        gap: 12px;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box
    }

    .header-qr-link {
        width: 36px;
        height: 36px
    }

    .header-qr {
        display: flex;
        grid-area: actions;
        justify-self: center;
        margin-right: 0
    }

    .mobile-nav-toggle {
        grid-area: actions;
        justify-self: end;
        margin-left: auto
    }

    .header-phones {
        grid-area: phone;
        justify-self: stretch;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        min-width: 0
    }

    .header-phone {
        font-size: 25px;
        font-weight: 600;
        white-space: nowrap
    }

    .logo {
        font-size: 20px
    }

    .logo-image {
        height: 35px
    }
}

@media (max-width:480px) {
    .site-header {
        gap: 10px;
        padding-left: 20px;
        padding-right: 20px;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box
    }

    .header-phones {
        gap: 3px
    }

    .header-phone {
        font-size: 30px;
        font-weight: 600
    }

    .logo {
        font-size: 18px
    }
}

@media (max-width:360px) {
    .site-header {
        gap: 8px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box
    }

    .header-phones {
        gap: 3px
    }

    .header-phone {
        font-size: 26px;
        font-weight: 600
    }

    .logo {
        font-size: 16px
    }

    .logo-image {
        height: 28px
    }
}

@media (max-width:350px) {
    .site-header {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box
    }
}

/* Scoped Header Font Adjustments */
.page-article .header-phone,
.page-contract .header-phone,
.page-lawsuit .header-phone {
    font-size: 25px !important;
}

.page-article .logo-text,
.page-contract .logo-text,
.page-lawsuit .logo-text {
    font-size: 20px !important;
}

.page-article .main-nav a,
.page-contract .main-nav a,
.page-lawsuit .main-nav a {
    font-size: 16px !important;
}