/* =========================================
   HEADER STYLES
   Exact match for https://regalia.agentfire.com/
   ========================================= */

/* Base Header */
.page-header {
    position: relative;
    z-index: 100;
}

.page-header--absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.sp-header {
    position: relative;
    width: 100%;
}

.sp-header--absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Header Row */
.row_header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 1920px;
}

/* Responsive padding and height */
@media (max-width: 575px) {
    .row_header {
        padding: 0 5vw;
        height: 60px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .row_header {
        padding: 0 5vw;
        height: 60px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .row_header {
        padding: 0 5vw;
        height: 60px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .row_header {
        padding: 0 5vw;
        height: 90px;
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .row_header {
        padding: 0 2.5vw;
        height: 90px;
    }
}

@media (min-width: 1600px) {
    .row_header {
        padding: 0 2.5vw;
        height: 90px;
    }
}

.row_header .cbl__row-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Column Layout */
.column_left {
    align-self: center;
    order: 0;
}

.column_center {
    text-align: center;
    align-self: center;
    order: 1;
}

.column_right {
    align-self: center;
    order: 2;
}

/* Responsive column widths */
@media (max-width: 575px) {
    .column_left {
        max-width: 20%;
        flex: 0 0 20%;
    }
    .column_center {
        max-width: 60%;
        flex: 0 0 60%;
    }
    .column_right {
        max-width: 20%;
        flex: 0 0 20%;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .column_left {
        max-width: 20%;
        flex: 0 0 20%;
    }
    .column_center {
        max-width: 60%;
        flex: 0 0 60%;
    }
    .column_right {
        max-width: 20%;
        flex: 0 0 20%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .column_left {
        max-width: 33.33%;
        flex: 0 0 33.33%;
    }
    .column_center {
        max-width: 33.33%;
        flex: 0 0 33.33%;
    }
    .column_right {
        max-width: 33.33%;
        flex: 0 0 33.33%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .column_left {
        max-width: 40%;
        flex: 0 0 40%;
    }
    .column_center {
        max-width: 20%;
        flex: 0 0 20%;
    }
    .column_right {
        max-width: 40%;
        flex: 0 0 40%;
    }
}

@media (min-width: 1200px) {
    .column_left {
        max-width: 42.5%;
        flex: 0 0 42.5%;
    }
    .column_center {
        max-width: 15%;
        flex: 0 0 15%;
    }
    .column_right {
        max-width: 42.5%;
        flex: 0 0 42.5%;
    }
}

.cbl__column-box {
    margin: 0;
    padding: 0;
}

/* Header Columns */
.fd-header__col {
    display: flex;
    align-items: center;
}

/* Menu Button */
.fd-header__menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.fd-header__menu-btn:hover {
    color: #B9A38B;
}

.fd-header__menu-btn .burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.fd-header__menu-btn .burger__line {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
}

/* Desktop Navigation */
.fd-header__nav {
    margin-left: 2rem;
}

.widget_desktop_nav {
    margin: 0;
    padding: 0;
}

/* Hide desktop nav on smaller screens */
@media (max-width: 575px) {
    .widget_desktop_nav {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .widget_desktop_nav {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .widget_desktop_nav {
        display: none !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .widget_desktop_nav {
        display: none !important;
    }
}

.spark-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spark-menu--horizontal {
    display: flex;
    gap: 2rem;
}

.spark-menu--horizontal > li {
    position: relative;
}

.spark-menu--horizontal > li > a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spark-menu--horizontal > li > a:hover {
    color: #B9A38B;
}

.spark-menu--horizontal .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #1b1b1e;
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
}

.spark-menu--horizontal > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.spark-menu--horizontal .sub-menu li {
    padding: 0;
}

.spark-menu--horizontal .sub-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.spark-menu--horizontal .sub-menu a:hover {
    color: #B9A38B;
}

/* Logo */
.widget_logo_desktop {
    margin: 0;
    padding: 0;
}

/* Hide desktop logo on small screens */
@media (max-width: 575px) {
    .widget_logo_desktop {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .widget_logo_desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .widget_logo_desktop {
        display: none !important;
    }
}

.widget_logo_desktop .cb-image {
    width: 138px;
    height: 80px;
}

.widget_logo_mobile {
    margin: 0;
    padding: 0;
}

/* Hide mobile logo on desktop */
@media (min-width: 992px) {
    .widget_logo_mobile {
        display: none !important;
    }
}

.widget_logo_mobile .cb-image {
    width: 95px;
    height: 55px;
}

/* Phone Button */
.widget_phone {
    margin: 0;
    padding: 0;
}

/* Hide phone on smaller screens */
@media (max-width: 575px) {
    .widget_phone {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .widget_phone {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .widget_phone {
        display: none !important;
    }
}

.fd-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.fd-header__cta:hover {
    color: #B9A38B;
}

/* IDX Account Widget */
.widget_idx_desktop {
    margin: 0;
    padding: 0;
    margin-left: 1.5rem;
}

/* Hide on smaller screens */
@media (max-width: 575px) {
    .widget_idx_desktop {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .widget_idx_desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .widget_idx_desktop {
        display: none !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .widget_idx_desktop {
        display: none !important;
    }
}

.aiw-account__guest {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
}

.aiw-account__button {
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.aiw-account__button:hover {
    color: #B9A38B;
}

.aiw-account__divider {
    color: #fff;
}

/* Mobile IDX Icon */
.widget_idx_mobile {
    margin: 0;
    padding: 0;
}

/* Hide on desktop */
@media (min-width: 1200px) {
    .widget_idx_mobile {
        display: none !important;
    }
}

.fd-header__idx--mobile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.fd-header__idx--mobile:hover {
    background: #B9A38B;
    border-color: #B9A38B;
    color: #fff;
}

/* Mobile Menu */
.sp-menu-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #1b1b1e;
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.sp-menu-mobile.active {
    right: 0;
}

.sp-menu-mobile__title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-menu-mobile__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sp-menu-mobile__close:before {
    content: '×';
}

.sp-menu-mobile__menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-menu-mobile__menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-menu-mobile__menu a {
    display: block;
    padding: 1rem 0;
    color: #fff;
    text-decoration: none;
    font-size: 1.125rem;
    transition: color 0.3s ease;
}

.sp-menu-mobile__menu a:hover {
    color: #B9A38B;
}

.sp-menu-mobile__footer {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.sp-menu-mobile__footer a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.sp-menu-mobile__footer a:hover {
    color: #B9A38B;
}

/* Mega Menu (Aside Panel) */
.spark-mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    background-color: transparent !important;
    z-index: 100030 !important;
    transition: opacity 0.4s ease, visibility 0.4s ease !important;
    overflow-y: auto !important;
}

.spark-mega-menu--hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.spark-mega-menu .afe-block,
.spark-mega-menu .fd-aside,
.spark-mega-menu .fd-aside__overlay {
    min-height: 100vh !important;
    background-color: transparent !important;
}

.spark-mega-menu .fd-aside__wrapper {
    min-height: 100vh !important;
    background-color: #121619 !important;
    max-width: 1050px !important;
}

.spark-mega-menu--fade-in {
    opacity: 0;
}

.spark-mega-menu:not(.spark-mega-menu--hidden) {
    opacity: 1;
}

.fd-aside {
    position: relative;
    width: 100%;
    height: 100%;
}

.fd-aside__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.fd-aside__wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #121619;
    height: 100%;
    z-index: 1;
}

/* Responsive padding for aside */
@media (max-width: 575px) {
    .fd-aside__wrapper {
        padding: 60px 5vw;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .fd-aside__wrapper {
        padding: 60px 5vw;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .fd-aside__wrapper {
        padding: 60px 5vw;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .fd-aside__wrapper {
        padding: 20px 5vw 10px;
        max-width: calc(960 / 1440 * 100vw + 90px);
    }
}

@media (min-width: 1200px) {
    .fd-aside__wrapper {
        padding: 20px 8.3vw 10px;
        max-width: calc(960 / 1440 * 100vw + 90px);
    }
}

.fd-aside__content {
    color: #fff;
    padding-top: 80px;
}

.fd-aside__menu {
    margin-bottom: 0 !important;
}

.fd-aside__content .mb-5,
.fd-aside__content .mb-lg-0,
.fd-aside__content .cbl__widget--wp_menu {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Menu links: Italiana font, normal weight, no bold */
.fd-aside__menu li a {
    font-family: 'Italiana', serif !important;
    font-weight: 400 !important;
    font-size: 26px !important;
    line-height: 34px !important;
}

@media (min-width: 1200px) {
    .fd-aside__menu li a {
        font-size: 28px !important;
        line-height: 38px !important;
    }
}

/* Tools menu - same font as main menu links */
.fd-aside__content > .cbl__widget--wp_menu:not(.d-inline-block) .spark-menu--vertical a {
    font-family: 'Italiana', serif !important;
    font-weight: 400 !important;
    font-size: 26px !important;
    line-height: 34px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (min-width: 1200px) {
    .fd-aside__content > .cbl__widget--wp_menu:not(.d-inline-block) .spark-menu--vertical a {
        font-size: 28px !important;
        line-height: 38px !important;
    }
}

/* Remove gap between main menu wrapper and tools menu */
.fd-aside__content > .cbl__widget--wp_menu.d-inline-block {
    margin-bottom: 0 !important;
}

.fd-aside__content > .cbl__widget--wp_menu.d-inline-block .fd-aside__menu {
    margin-bottom: 0 !important;
}

.fd-aside__content > .cbl__widget--wp_menu:not(.d-inline-block) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.spark-menu--vertical {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spark-menu--vertical li {
    margin-bottom: 0;
}

.spark-menu--vertical a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.3s ease;
    padding: 0.25rem 0;
    display: inline-block;
}

.spark-menu--vertical a:hover {
    color: #B9A38B;
}

.fd-contact__link {
    color: #fff;
}

.fd-contact__link p {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
}

.fd-contact__link a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fd-contact__link a:hover {
    color: #B9A38B;
}

.fd-socials {
    gap: 1rem;
}

.fd-socials a {
    width: 50px;
    height: 50px;
    color: #fff;
    transition: color 0.3s ease;
}

.fd-socials a:hover {
    color: #B9A38B;
}

.fd-socials .icon {
    font-size: 1.5rem;
}

.fd-aside__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.fd-aside__close--btn {
    width: 50px;
    height: 50px;
    position: relative;
    color: #fff;
    text-decoration: none;
}

.fd-aside__close--btn .burger__line {
    position: absolute;
    width: 30px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
}

.fd-aside__close--btn .burger__line.x {
    transform: rotate(45deg);
}

.fd-aside__close--btn .burger__line.y {
    transform: rotate(-45deg);
}

.fd-aside__close--btn:hover {
    color: #B9A38B;
}

/* When mega menu is open, prevent header from intercepting clicks */
body.mega-menu-open .page-header {
    pointer-events: none;
    z-index: 1;
}

/* JavaScript Menu Toggle */
.fd-header__menu-btn[href="#mm-1602"] {
    cursor: pointer;
}
