/**
 * Custom Header Styles
 * Reduce header height to fit logo size
 */

.header {
    padding: 15px 30px !important;
}

/* Fix: Desktop/Mobile header visibility */
.header .desktop-header {
    display: none !important;
}

.header .mobile-header-wrapper {
    display: flex !important;
    flex-direction: column;
    width: 100%;
}

/* Ensure header accommodates mobile layout */
@media (max-width: 991px) {
    .header {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .header__builder {
        height: auto !important;
        overflow: visible !important;
    }
}

@media (min-width: 992px) {
    .header .desktop-header {
        display: flex !important;
    }

    .header .mobile-header-wrapper {
        display: none !important;
    }
}

/* Ensure logo is properly sized */
.header .logo img {
    max-height: 60px;
    width: auto;
}

/* Adjust button alignment */
.header .btn-phone,
.header .btn-cont-client {
    line-height: normal;
}

/* Mobile header layout */
@media (max-width: 991px) {
    .mobile-header-wrapper {
        width: 100%;
        gap: clamp(0.5rem, 2vw, 1rem);
    }

    .mobile-header-row-1,
    .mobile-header-row-2 {
        flex-wrap: nowrap !important;
    }

    .mobile-header-row-1 .logo {
        width: clamp(120px, 40vw, 200px);
        flex-shrink: 0;
    }

    .mobile-header-row-1 .logo img {
        max-height: clamp(35px, 8vw, 60px);
        width: auto;
    }

    .mobile-header-row-2 .btn-phone {
        padding: clamp(0.3rem, 2vw, 0.75rem) 0 !important;
        font-size: clamp(0.7rem, 3vw, 1rem) !important;
        white-space: nowrap;
        margin-left: 0 !important;
        margin-right: auto;
        overflow: visible !important;
        border-radius: 0 !important;
        line-height: 1.4 !important;
    }

    .mobile-header-row-2 .btn-phone span {
        overflow: visible !important;
        display: inline-block;
    }

    .mobile-header-row-2 .btn-cont-client {
        padding: clamp(0.3rem, 2vw, 0.75rem) 0 !important;
        font-size: clamp(0.7rem, 3vw, 1rem) !important;
        white-space: nowrap;
        margin-left: auto;
        margin-right: 0 !important;
        text-align: right;
        overflow: visible !important;
        border-radius: 0 !important;
        line-height: 1.4 !important;
    }

    .mobile-header-row-2 .btn-cont-client span {
        overflow: visible !important;
        display: inline-block;
    }

    .mobile-header-row-2 .btn-phone i,
    .mobile-header-row-2 .btn-cont-client i {
        font-size: clamp(0.8rem, 3.5vw, 1.2rem) !important;
    }
}

/* Mobile bottom navigation - single row, scales with screen */
@media (max-width: 991px) {
    .tabs-pj .nav-tabs {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .tabs-pj .nav-tabs .nav-item {
        flex: 1 1 25%;
        max-width: 25%;
    }

    .tabs-pj .nav-tabs .nav-link {
        padding: clamp(0.3rem, 2vw, 0.85rem) clamp(0.2rem, 1.5vw, 1.2rem) !important;
        min-height: clamp(40px, 10vw, 60px) !important;
        flex-direction: column !important;
        text-align: center;
        white-space: nowrap;
    }

    .tabs-pj .nav-tabs .nav-link i {
        font-size: clamp(1.2rem, 5vw, 2.5rem) !important;
        margin-right: 0 !important;
        margin-bottom: 0.2rem;
    }

    .tabs-pj .nav-tabs .nav-link span {
        font-size: clamp(0.5rem, 2.5vw, 1rem) !important;
    }
}
