/* Touch & Glow UI hotfixes: keep header and slider separated */

/* Put header in normal document flow so slider starts below menu */
.ttm-stickable-header-w {
    position: relative;
    width: 100%;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.88);
}

#masthead {
    position: relative;
    z-index: 20;
}

/* Logo sizing */
#masthead .site-branding {
    display: flex;
    align-items: center;
}

#masthead .site-branding img,
#masthead .site-branding #logo-img {
    width: auto;
    max-width: 240px;
    max-height: 68px;
    object-fit: contain;
}

/* Header topbar improvements */
.ttm-topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.ttm-topbar-content .top-contact {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

.ttm-topbar-content .topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.ttm-topbar-wrapper {
    height: auto;
    line-height: normal;
    padding: 8px 0;
}

.ttm-topbar-wrapper .top-contact.text-left {
    float: none;
    line-height: 1.25;
}

.ttm-topbar-content .top-contact li {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ttm-topbar-content .top-contact li:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttm-topbar-content .top-contact li a {
    color: inherit;
}

.ttm-topbar-content .topbar-right .ttm-social-links-wrapper {
    order: 1;
    padding-right: 8px;
}

.ttm-topbar-content .topbar-right .header-btn {
    order: 2;
    float: none !important;
    height: auto !important;
    line-height: normal !important;
    margin: 0;
}

.ttm-topbar-content .topbar-right .header-btn a {
    display: inline-block;
    padding: 7px 14px;
    background: linear-gradient(135deg, #bf9456 0%, #d4a866 100%);
    color: #000 !important;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.1;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.ttm-topbar-content .topbar-right .header-btn a:hover {
    background: linear-gradient(135deg, #d4a866 0%, #bf9456 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(191, 148, 86, 0.35);
}

/* Desktop header rhythm */
@media only screen and (min-width: 1200px) {
    .ttm-header-style-01 .site-branding,
    .ttm-header-style-01 #site-header-menu #site-navigation .menu > ul > li > a {
        height: 90px;
        line-height: 90px;
    }

    .site-header-menu {
        height: 90px;
    }

    /* No artificial push needed once header is out of overlay mode */
    .modern-hero-slider .slide-content {
        padding-top: 32px;
        align-items: center;
    }
}

/* Tablet/mobile safety */
@media only screen and (max-width: 1199px) {
    #masthead .site-branding img,
    #masthead .site-branding #logo-img {
        max-width: 200px;
        max-height: 58px;
    }

    .modern-hero-slider .slide-content {
        padding-top: 16px;
    }
    
    .ttm-topbar-content {
        gap: 10px;
    }

    .ttm-topbar-content .top-contact li {
        font-size: 13px;
    }

    .ttm-topbar-content .topbar-right .header-btn a {
        padding: 6px 11px;
        font-size: 12px;
    }
}

@media only screen and (max-width: 991px) {
    .ttm-topbar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .ttm-topbar-content .topbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media only screen and (max-width: 767px) {
    #masthead .site-branding img,
    #masthead .site-branding #logo-img {
        max-width: 170px;
        max-height: 52px;
    }

    .modern-hero-slider .slide-content {
        padding-top: 12px;
    }
    
    .ttm-topbar-content .top-contact li {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .ttm-topbar-content .top-contact li i {
        font-size: 12px;
    }
    
    .ttm-topbar-content .topbar-right .header-btn a {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .ttm-social-links-wrapper {
        padding-left: 0 !important;
        padding-right: 8px !important;
    }
    
    .ttm-social-links-wrapper .social-icons li {
        margin: 0 2px !important;
    }
}

@media only screen and (max-width: 575px) {
    .ttm-topbar-content .top-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ttm-topbar-content .top-contact li {
        width: 100%;
    }
    
    .ttm-topbar-content .topbar-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ttm-topbar-content .topbar-right .header-btn {
        width: 100%;
    }
    
    .ttm-topbar-content .topbar-right .header-btn a {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* Keep long hero text controlled */
.modern-hero-slider .slide-text {
    max-width: min(700px, 92vw);
}

@media only screen and (max-width: 575px) {
    .modern-hero-slider .slide-buttons {
        width: 100%;
        align-items: center;
    }
}
