/* Custom Styles for UBC Builder Enhancement */

:root {
    --accent: #118D57;
    --dark: #0b0b0b;
    --light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
}

/* Force original colors and disable template filters */
img,
.ubc-project-img,
.ubc-project-card,
.ubc-hero-section,
.ubc-progress-container,
.mil-logo img {
    filter: none !important;
    mix-blend-mode: normal !important;
    -webkit-filter: none !important;
}

/* ─── Equal-height portfolio cards (desktop) ─── */
#portfolio .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

#portfolio .row>[class*="col-lg"] {
    display: flex;
    flex-direction: column;
}

#portfolio .mil-portfolio-item {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#portfolio .mil-portfolio-item:hover {
    box-shadow: 0 12px 40px rgba(17, 141, 87, 0.12);
    transform: translateY(-4px);
}

#portfolio .mil-cover-frame {
    flex-shrink: 0;
}

#portfolio .mil-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 32px;
}

#portfolio .mil-description h4 {
    margin-bottom: 14px;
}

#portfolio .mil-description p {
    flex: 1;
    margin-bottom: 0;
}

/* Ongoing Projects Progress */
.ubc-progress-container {
    padding: 120px 0;
    background: #ffffff !important;
    position: relative;
    overflow: hidden;
}

/* Footer Fix: Disable Invert Filter and set solid dark background */
.mil-dark-bg {
    background: #0b0b0b !important;
}

.mil-dark-bg:before {
    display: none !important;
}

.mil-dark-bg .mil-light-soft {
    color: rgba(255, 255, 255, 0.7) !important;
}

.mil-dark-bg h6,
.mil-dark-bg .mil-muted,
.mil-dark-bg a {
    color: #ffffff !important;
}

.mil-dark-bg .mil-footer-menu ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
}

.mil-dark-bg .mil-footer-menu ul li a:hover {
    color: var(--accent) !important;
}

/* Button Padding & Color Fix */
.mil-button {
    padding: 0 40px !important;
    height: 60px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 180px;
    background-color: #0B3D2E !important;
    /* Premium Deep Forest Green */
    color: #ffffff !important;
    /* White text for better contrast */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 70px !important;
    border: 1px solid #0B3D2E !important;
    text-decoration: none !important;
}

.mil-button span {
    color: inherit !important;
    transition: inherit !important;
}

.mil-button svg path,
.mil-button svg line,
.mil-button svg polyline {
    fill: #ffffff !important;
    /* Ensure arrow is white */
    stroke: #ffffff !important;
    transition: all 0.4s ease !important;
}

.mil-button:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px) !important;
}

.mil-button:hover svg path,
.mil-button:hover svg line,
.mil-button:hover svg polyline {
    fill: #000000 !important;
    stroke: #000000 !important;
}

/* Ensure circular text buttons remain pills as per original design */
.mil-circle-text .mil-button {
    min-width: 0 !important;
    width: 30px !important;
    height: 70px !important;
    padding: 0 !important;
    border-radius: 15px !important;
}



.mil-button.mil-icon-button-sm {
    min-width: 0 !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

/* Current Page Clickable Fix */
.mil-current-page {
    pointer-events: all !important;
}

.mil-current-page a {
    color: inherit;
    text-decoration: none;
}






.mil-button svg {
    margin-left: 20px !important;
    margin-right: -10px;
    /* Pull arrow slightly closer to edge for balance */
}

.mil-button.mil-icon-button-sm {
    padding: 0 !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
}

.mil-button.mil-icon-button-sm svg {
    margin-left: 0 !important;
}




.mil-ongoing-slider {
    overflow: visible !important;
}

.mil-mt-60 {
    margin-top: 60px;
}

/* Portfolio Item Buttons - Always Visible & Responsive */
.mil-project-buttons {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    /* Space between View Project link and Brochure button */
    margin-top: 40px !important;
}

.mil-project-buttons .mil-link {
    margin-right: 10px;
}

.mil-project-buttons .mil-button {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

@media screen and (max-width: 992px) {
    .mil-project-buttons {
        gap: 25px !important;
        margin-top: 30px !important;
    }
}

@media screen and (max-width: 576px) {
    .mil-project-buttons {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
    }

    .mil-project-buttons .mil-button {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 30px !important;
        height: 55px !important;
    }
}

/* Hero Buttons Responsive */
.ubc-hero-buttons {
    display: flex !important;
    gap: 30px !important;
    flex-wrap: wrap !important;
    margin-top: 40px !important;
}

@media screen and (max-width: 768px) {
    .ubc-hero-buttons {
        gap: 20px !important;
        margin-top: 30px !important;
    }
}

@media screen and (max-width: 576px) {
    .ubc-hero-buttons {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .ubc-hero-buttons .mil-button {
        width: auto !important;
        min-width: 0 !important;
    }
}

/* Enhanced View Project Link */
.mil-link.mil-dark {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    transition: all 0.3s ease !important;
    letter-spacing: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.mil-link.mil-dark:hover {
    color: var(--accent) !important;
    letter-spacing: 3px !important;
    /* Elegant expansion on hover */
}

.mil-link.mil-dark svg {
    background-color: transparent !important;
    /* Cleaner look */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-left: 20px !important;
    transition: all 0.3s ease !important;
}

.mil-link.mil-dark:hover svg {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    transform: scale(1.1) !important;
}

.mil-link.mil-dark:hover svg path,
.mil-link.mil-dark:hover svg line,
.mil-link.mil-dark:hover svg polyline {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.ubc-progress-container h2 {
    color: #000000 !important;
}

.ubc-progress-container .mil-suptitle {
    color: #888888 !important;
}

.ubc-watermark {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 300px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05);
    /* Dark watermark on light bg */
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.ubc-project-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: #111;
    margin-bottom: 30px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ubc-project-card:hover {
    transform: translateY(-15px);
    border-color: rgba(17, 61, 45, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.ubc-project-img {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.ubc-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ubc-project-card:hover .ubc-project-img img {
    transform: scale(1.1);
}

.ubc-project-content {
    padding: 40px 35px;
    background: #161616;
}

.ubc-project-content h4 {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 15px;
}

.ubc-project-content p {
    color: #cccccc !important;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

.ubc-project-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.ubc-status-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(17, 61, 45, 0.15);
    color: #118D57;
    padding: 6px 14px;
    font-weight: 600;
    border: 1px solid rgba(17, 61, 45, 0.3);
    border-radius: 2px;
}

.ubc-progress-percent {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--light);
}

.ubc-progress-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ubc-progress-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    /* Animated via GSAP */
    transition: width 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Hero Section Enhancements */
.ubc-hero-section {
    background: #000 !important;
    position: relative;
    padding: 250px 0 120px;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.ubc-hero-section h1 {
    color: #ffffff !important;
    font-size: 64px !important;
    /* Smaller as requested */
    line-height: 1.1;
    margin-bottom: 40px !important;
}

.ubc-hero-section h1 .mil-thin {
    color: #ffffff !important;
    opacity: 0.7;
}

@media screen and (min-width: 769px) and (max-width: 991px) {

    /* Tablet hero — fixed, full viewport */
    body.ubc-home .ubc-hero-section {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background: #0b0b0b !important;
    }

    .ubc-hero-section .mil-banner-content {
        padding: 0 40px 60px 40px;
        text-align: center;
        width: 100%;
        z-index: 2;
    }

    /* Override Bootstrap col-md-7 — full width paragraph */
    .mil-banner-content .row>[class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .mil-banner-content h1 {
        font-size: 46px !important;
        line-height: 1.1 !important;
        margin-bottom: 16px !important;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
        text-align: center;
    }

    .mil-banner-content p {
        font-size: 14px !important;
        margin-bottom: 28px !important;
        line-height: 1.6 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-align: center;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .ubc-hero-buttons {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 16px;
        flex-wrap: nowrap;
    }

    .ubc-hero-buttons .mil-button {
        width: auto !important;
        padding: 10px 22px !important;
        font-size: 11px !important;
        border-radius: 50px;
        min-height: 40px;
        letter-spacing: 1px;
    }

    .mil-circle-text {
        display: none !important;
    }

    #about {
        margin-top: 100vh !important;
        position: relative;
        z-index: 10;
        background: #ffffff;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.15);
        padding-top: 15px !important;
    }

    body.ubc-home #ongoing,
    body.ubc-home #portfolio,
    body.ubc-home .ubc-editorial-section {
        position: relative;
        z-index: 10;
    }

    body.ubc-home #portfolio {
        background: #ffffff;
        position: relative;
        z-index: 10;
    }

    /* Footer must also block hero */
    body.ubc-home .mil-footer {
        position: relative;
        z-index: 10;
        background: #111111;
    }

    .ubc-hero-section::before {
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        opacity: 0.5;
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
    }

    .ubc-hero-section .mil-banner-content {
        padding: 0 20px 15px 20px;
        text-align: center;
        width: 100%;
        z-index: 2;
        margin-bottom: 0;
    }

    .mil-banner-content h1 {
        font-size: 34px !important;
        line-height: 1.15 !important;
        margin-bottom: 12px !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }

    .mil-banner-content h1 br {
        display: block !important;
    }

    .mil-banner-content p {
        font-size: 11px !important;
        margin-bottom: 20px !important;
        line-height: 1.4 !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .ubc-hero-buttons {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 0;
        width: 100%;
        flex-wrap: nowrap;
    }

    .ubc-hero-buttons .mil-button {
        width: auto !important;
        padding: 8px 16px !important;
    }
}

.ubc-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/lotus_4k.jpeg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
    filter: none !important;
    /* Prevent any accidental inversion */
}

.mil-banner-content .mil-suptitle:before {
    display: none !important;
    /* Remove the line on the left to allow clean alignment */
}

.ubc-hero-buttons {
    display: flex;
    align-items: center;
    gap: 40px;
}

@media screen and (max-width: 768px) {

    /* Fixed hero ONLY on homepage - scoped to index page hero section */
    body.ubc-home .ubc-hero-section {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background: #0b0b0b !important;
    }

    /* On non-home pages, ensure full white background to prevent bleed-through */
    body:not(.ubc-home) .mil-content {
        background: #ffffff;
        position: relative;
        z-index: 10;
    }

    body:not(.ubc-home) #swupMain {
        background: #ffffff;
        position: relative;
        z-index: 10;
    }

    #about {
        margin-top: 100vh !important;
        position: relative;
        z-index: 10;
        background: #ffffff;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.15);
        padding-top: 15px !important;
    }

    /* Footer must also block hero */
    body.ubc-home .mil-footer {
        position: relative;
        z-index: 10;
        background: #111111;
    }

    .ubc-hero-section::before {
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        opacity: 0.5;
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
    }

    .ubc-hero-section .mil-banner-content {
        padding: 0 20px 15px 20px;
        text-align: center;
        width: 100%;
        z-index: 2;
        margin-bottom: 0;
    }

    .mil-banner-content h1 {
        font-size: 34px !important;
        line-height: 1.15 !important;
        margin-bottom: 12px !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }

    .mil-banner-content h1 br {
        display: block !important;
    }

    .mil-banner-content p {
        font-size: 11px !important;
        margin-bottom: 20px !important;
        line-height: 1.4 !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .ubc-hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-top: 20px !important;
        width: 100% !important;
    }

    .ubc-hero-buttons .mil-button {
        width: 100% !important;
        max-width: 280px;
        justify-content: center !important;
        padding: 16px 30px !important;
        font-size: 13px !important;
        height: auto !important;
        border-radius: 50px;
        letter-spacing: 1px;
    }

    .ubc-hero-buttons .mil-button-outline {
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        background: transparent !important;
        color: #fff !important;
    }

    .mil-circle-text {
        display: none !important;
    }

    .mil-cover-frame {
        height: auto !important;
    }

    .mil-cover-frame img {
        height: auto !important;
        object-fit: contain !important;
    }

    .mil-banner-content .mil-btn-space {
        margin-right: 0 !important;
        margin-bottom: 0;
    }
}

.mil-banner-content .mil-thin {
    font-weight: 200;
    opacity: 0.7;
}

/* Stats Section */
.ubc-stats-grid {
    display: flex;
    gap: 60px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.ubc-stat-item {
    padding: 0;
    background: transparent;
    border: none;
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    transition: all 0.3s ease;
}

.ubc-stat-item:hover {
    background: transparent;
    transform: translateX(5px);
}

.ubc-stat-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--accent) !important;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

.ubc-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #000000 !important;
    font-weight: 700;
    line-height: 1.4;
    max-width: 150px;
}


/* ============================================================
   Completed Projects Swiper Carousel
   ============================================================ */
.ubc-completed-slider-wrap {
    position: relative;
    padding: 0 0 60px;
}

.ubc-completed-slider .swiper-slide {
    padding: 0 15px;
    box-sizing: border-box;
}

/* Arrow buttons */
.ubc-slider-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #000;
}

.ubc-slider-arrow:hover {
    background: #118d57;
    border-color: #118d57;
    color: #fff;
    box-shadow: 0 6px 20px rgba(17, 141, 87, 0.3);
}

.ubc-completed-prev {
    left: -24px;
}

.ubc-completed-next {
    right: -24px;
}

@media screen and (max-width: 768px) {
    .ubc-completed-prev {
        left: 0px;
    }

    .ubc-completed-next {
        right: 0px;
    }

    .ubc-slider-arrow {
        width: 38px;
        height: 38px;
    }
}

/* Pagination dots */
.ubc-completed-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    border-radius: 50%;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.ubc-completed-pagination .swiper-pagination-bullet-active {
    background: #118d57;
    width: 24px;
    border-radius: 4px;
}

/* Portfolio Section */

.mil-cover-frame {
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
}

.mil-cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    /* Focus on the building at the bottom of the shot */
    transition: transform 0.6s ease;
}

.mil-portfolio-item:hover .mil-cover-frame img {
    transform: scale(1.05);
}

/* Watermark & Decorative Elements */
.ubc-watermark {
    position: absolute;
    bottom: -50px;
    right: -20px;
    font-size: 200px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    z-index: 0;
    text-transform: uppercase;
    line-height: 1;
}

.ubc-accent-line {
    width: 100px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 30px;
}

/* Preloader Enhancements */
.mil-preloader-animation {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.ubc-preloader-logo {
    opacity: 0;
    transform: scale(0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ubc-preloader-video {
    width: 300px;
    /* Medium size for desktop */
    height: auto;
    max-width: 80vw;
    /* Responsive scaling */
    mix-blend-mode: multiply;
    /* Blends light colors into the white background */
    filter: brightness(1.1) contrast(1.2);
    /* Forces off-white backgrounds to pure white */
    outline: none;
    border: none;
    display: block;
}

@media screen and (max-width: 767px) {
    .ubc-preloader-video {
        width: 200px;
        /* Smaller size for mobile */
    }
}

/* Footer Logo Container - Small & Minimal */
.ubc-footer-logo-container {
    background: #ffffff;
    padding: 15px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: auto;
    min-width: 150px;
}

.ubc-footer-logo-container img {
    display: block;
    max-width: 100%;
    height: 50px !important;
    /* Smaller, more elegant logo */
}

/* Subscribe Button Icon Fix */
.ubc-send-btn i {
    font-size: 14px;
    color: #fff;
}

/* Prevent logo overlap site-wide on project banners */
.mil-banner-sm .mil-banner-content {
    padding-top: 100px !important;
}

@media screen and (max-width: 991px) {
    .mil-banner-sm .mil-banner-content {
        padding-top: 60px !important;
    }
}

/* Email Label & Alignment */
.ubcinfra-email {
    display: inline-block;
    margin-top: 20px;
    font-weight: 600;
    color: var(--accent);
}

.ubc-brand-marquee-section {
    background: #ffffff;
    padding: 60px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.ubc-brand-marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 100px;
}

.ubc-marquee-content {
    display: flex;
    flex-shrink: 0;
    gap: 100px;
    padding-right: 100px;
    /* Match gap for seamless transition */
    animation: scroll-marquee 20s linear infinite;
}

.ubc-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    opacity: 0.3;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    white-space: nowrap;
}

.ubc-brand-item:hover {
    opacity: 0.8;
    filter: grayscale(0%);
}

.ubc-brand-item img {
    height: 100%;
    width: auto;
}

.ubc-brand-item span {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 5px;
    color: #000000;
}

@keyframes scroll-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Project Detail Table Styles */
.mil-table {
    width: 100%;
    border-collapse: collapse;
}

.mil-table th,
.mil-table td {
    padding: 20px 0;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-family: 'Outfit', sans-serif;
}

.mil-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
}

.mil-table td {
    font-size: 16px;
    color: var(--dark);
    font-weight: 400;
}

.mil-table tr:last-child td {
    border-bottom: none;
}




/* Editorial Project Section Styles */
.ubc-editorial-section {
    background: #000;
    overflow: hidden;
}

.ubc-editorial-img-wrapper {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.ubc-editorial-img {
    height: 100%;
    width: 100%;
    display: block;
}

.ubc-editorial-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.ubc-editorial-img:hover img {
    transform: scale(1.05);
}

.ubc-editorial-content {
    background: #000;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12% 100px;
    position: relative;
}

.ubc-editorial-header {
    margin-top: auto;
}

.ubc-project-number {
    font-size: 120px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 50px;
    right: 50px;
    line-height: 1;
}

.ubc-modern-progress {
    width: 100%;
    margin-bottom: 40px;
}

.ubc-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.ubc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.ubc-percent {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent);
}

.ubc-bar-bg {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.ubc-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.ubc-thumb-nav {
    margin-top: 40px;
    width: 80%;
}

/* Slider Controls Positioning */
.ubc-editorial-controls {
    position: absolute;
    bottom: 50px;
    right: 50px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.mil-slider-arrow {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mil-slider-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.mil-slider-arrow svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* Thumbnail Navigation */
.ubc-thumb-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 80px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ubc-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.ubc-thumb-item:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media screen and (max-width: 991px) {
    .mil-frame-top {
        padding: 20px !important;
        background: transparent !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
    }

    .mil-logo img {
        height: 30px !important;
    }

    .ubc-editorial-img-wrapper {
        height: auto !important;
        padding: 0 !important;
        margin-top: 30px !important;
        /* Added gap above image on mobile */
    }

    .ubc-editorial-img {
        height: auto !important;
        display: block;
    }

    .ubc-editorial-img img {
        height: auto !important;
        object-fit: contain !important;
    }

    .ubc-editorial-content {
        padding: 60px 25px !important;
        height: auto !important;
    }

    .ubc-project-number {
        font-size: 40px !important;
        top: 20px !important;
        right: 20px !important;
        opacity: 0.2 !important;
    }

    .ubc-thumb-nav {
        width: 100% !important;
        margin-top: 30px !important;
    }

    .ubc-editorial-header h2 {
        font-size: 32px !important;
    }

    .ubc-editorial-controls {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: 30px;
        gap: 15px;
    }

    .mil-slider-arrow {
        width: 50px;
        height: 50px;
    }
}

@media screen and (max-width: 480px) {
    .ubc-editorial-header h2 {
        font-size: 28px !important;
    }

    .mil-banner-content h1 {
        font-size: 32px !important;
    }

    .ubc-stat-number {
        font-size: 32px;
    }
}

/* Desktop Navbar */
.ubc-desktop-nav {
    display: none;
    pointer-events: all;
}

@media screen and (min-width: 1201px) {
    .ubc-desktop-nav {
        display: block;
        margin-left: auto;
        margin-right: 40px;
    }

    .ubc-desktop-nav ul {
        display: flex;
        gap: 35px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .ubc-desktop-nav ul li a {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: #000000;
        transition: all 0.3s ease;
        position: relative;
        opacity: 0.8;
    }

    .ubc-desktop-nav ul li a:hover,
    .ubc-desktop-nav ul li a.active {
        color: var(--accent) !important;
        opacity: 1;
    }

    .ubc-desktop-nav ul li a:after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--accent);
        transition: width 0.3s ease;
    }

    .ubc-desktop-nav ul li a:hover:after,
    .ubc-desktop-nav ul li a.active:after {
        width: 100%;
    }

    /* Hide hamburger menu on desktop */
    .mil-frame .mil-menu-btn {
        display: none !important;
    }

    /* White Navbar background */
    .mil-frame-top {
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        height: 100px !important;
        display: flex;
        align-items: center;
        padding: 0 80px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        justify-content: flex-start !important;
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 9999 !important;
        transition: all 0.4s ease !important;
    }

    .mil-frame-top.mil-header-transparent {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .mil-frame-top.mil-header-transparent .ubc-desktop-nav ul li a {
        color: #fff !important;
    }

    .mil-frame-top.mil-header-transparent .mil-menu-btn span,
    .mil-frame-top.mil-header-transparent .mil-menu-btn span:after,
    .mil-frame-top.mil-header-transparent .mil-menu-btn span:before {
        background: #fff !important;
    }

    .mil-frame-top.mil-header-transparent .mil-logo img {
        filter: brightness(0) invert(1);
        /* Makes the logo white */
    }

    /* Restore Frame & Current Page Positioning */
    .mil-frame {
        padding: 0 !important;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 2;
    }

    .mil-frame-bottom {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0 60px 60px 60px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        pointer-events: none !important;
    }

    .mil-current-page {
        pointer-events: all !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
        font-size: 11px !important;
        color: rgba(255, 255, 255, 0.4) !important;
        /* Elegant semi-transparent white */
        transform: rotate(-90deg) translateX(40px) translateY(-20px) !important;
        transform-origin: left bottom !important;
        white-space: nowrap !important;
    }

    .mil-current-page a {
        color: inherit !important;
        transition: all 0.3s ease !important;
    }

    .mil-current-page a:hover {
        color: var(--accent) !important;
    }

    .mil-back-to-top {
        pointer-events: all !important;
        transform: rotate(-90deg) translateX(30px) translateY(30px) !important;
        transform-origin: right bottom !important;
    }
}

/* Outline Button */
.mil-button.mil-button-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.mil-button.mil-button-outline:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.mil-button.mil-button-outline:hover svg path {
    fill: #000000 !important;
}

.mil-hidden-elements {
    display: none !important;
}

/* Footer Subscription Button Fix */
.mil-subscribe-form {
    position: relative !important;
    width: 100% !important;
    max-width: 400px !important;
}

.mil-subscribe-form input {
    width: 100% !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important;
    padding: 0 70px 0 30px !important;
    color: #fff !important;
    font-size: 14px !important;
}

.mil-subscribe-form .mil-button {
    position: absolute !important;
    right: 5px !important;
    top: 5px !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    background: #118D57 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: 0.4s !important;
}

.mil-subscribe-form .mil-button:hover {
    background: #15a365 !important;
    transform: scale(1.05) !important;
}

.mil-subscribe-form .mil-button svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    color: #fff !important;
    display: block !important;
}

/* ==========================================================================
   Header Solid White Background Everywhere Override
   ========================================================================== */
.mil-frame-top,
.mil-frame-top.mil-header-transparent {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    height: 100px !important;
    display: flex !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

/* Ensure Logo is never inverted/white and retains its natural colors */
.mil-frame-top.mil-header-transparent .mil-logo img,
.mil-logo img {
    filter: none !important;
    -webkit-filter: none !important;
    height: 60px !important;
}

/* Ensure desktop nav items are always black */
.mil-frame-top.mil-header-transparent .ubc-desktop-nav ul li a,
.ubc-desktop-nav ul li a {
    color: #000000 !important;
    opacity: 0.8 !important;
}

/* Hover/active state */
.mil-frame-top.mil-header-transparent .ubc-desktop-nav ul li a:hover,
.mil-frame-top.mil-header-transparent .ubc-desktop-nav ul li a.active,
.ubc-desktop-nav ul li a:hover,
.ubc-desktop-nav ul li a.active {
    color: var(--accent) !important;
    opacity: 1 !important;
}

/* Mobile Hamburger Menu Button Color (always black on white header) */
.mil-frame-top.mil-header-transparent .mil-menu-btn span,
.mil-frame-top.mil-header-transparent .mil-menu-btn span:after,
.mil-frame-top.mil-header-transparent .mil-menu-btn span:before,
.mil-menu-btn span,
.mil-menu-btn span:after,
.mil-menu-btn span:before {
    background: #000000 !important;
}

/* On mobile, ensure mil-frame-top is solid white */
@media screen and (max-width: 991px) {

    .mil-frame-top,
    .mil-frame-top.mil-header-transparent {
        background: #ffffff !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        padding: 10px 20px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* ==========================================================================
   Image Fit Overrides: Display Images Fully (No Cropping)
   ========================================================================== */

/* Completed Projects / Grid Cover Frame */
.mil-cover-frame {
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 12px;
}

.mil-cover-frame img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Ongoing Projects / Detail Pages / Galleries Image Frame */
.mil-img-frame {
    padding-bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
}

.mil-img-frame img {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Editorial ongoing slider images on Homepage */
.ubc-editorial-img-wrapper {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ubc-editorial-img {
    height: auto !important;
    max-height: 90vh !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ubc-editorial-img img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* ==========================================================================
   Luxury Masonry Gallery Styling
   ========================================================================== */
.ubc-gallery-masonry {
    column-width: 300px;
    column-gap: 16px !important;
    width: 100%;
}

.ubc-gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 16px !important;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ubc-gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.ubc-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ubc-gallery-item:hover .ubc-gallery-image {
    transform: scale(1.06);
}

.ubc-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    box-sizing: border-box;
}

.ubc-gallery-item:hover .ubc-gallery-overlay {
    opacity: 1;
}

.ubc-gallery-title {
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ubc-gallery-item:hover .ubc-gallery-title {
    transform: translateY(0);
}

.ubc-gallery-desc {
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.5;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s;
}

.ubc-gallery-item:hover .ubc-gallery-desc {
    transform: translateY(0);
}

/* ==========================================================================
   Typography Sizing Reductions (Clean, Premium Compact Scale)
   ========================================================================== */
body,
p,
li,
td,
th {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

h1,
.mil-banner-content h1,
h1 span {
    font-size: 60px !important;
}

@media (max-width: 768px) {

    h1,
    .mil-banner-content h1,
    h1 span {
        font-size: 36px !important;
    }
}

h2,
.mil-banner-content h2 {
    font-size: 38px !important;
    line-height: 1.35 !important;
}

@media (max-width: 768px) {
    h2 {
        font-size: 28px !important;
    }
}

h3,
h3 span {
    font-size: 26px !important;
}

h4,
h4 span {
    font-size: 19px !important;
}

h5 {
    font-size: 15px !important;
}

.ubc-stat-number {
    font-size: 48px !important;
}

.ubc-stat-label {
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
}

.ubc-desktop-nav ul li a {
    font-size: 13px !important;
}

.mil-breadcrumbs li,
.mil-breadcrumbs li a {
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
}

/* Tighten header title and breadcrumbs vertical spacing */
.mil-banner-content h1,
.mil-banner-content .mil-h1 {
    margin-bottom: 12px !important;
}

.mil-breadcrumbs {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Premium Mobile UX & Image Aspect Ratio Optimization */
@media (max-width: 991px) {

    /* Ongoing dynamic project section container scaling */
    .ubc-editorial-img-wrapper {
        height: auto !important;
        padding: 0 !important;
        margin-top: 25px !important;
        margin-bottom: 10px !important;
        aspect-ratio: 16/9 !important;
        overflow: hidden !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    .ubc-editorial-img {
        height: 100% !important;
        width: 100% !important;
        display: block !important;
    }

    .ubc-editorial-img img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .ubc-editorial-content {
        padding: 40px 20px !important;
        height: auto !important;
    }

    /* Ongoing thumb items */
    .ubc-thumb-nav {
        margin-top: 25px !important;
    }

    .ubc-thumb-item {
        height: 55px !important;
        border-radius: 6px !important;
    }
}

/* Ensure all portfolio and details page main images show in 100% height and width on mobile/tablet viewports */
@media (max-width: 768px) {
    .mil-img-frame {
        padding-bottom: 0 !important;
        height: auto !important;
        background: transparent !important;
        aspect-ratio: 16/9 !important;
        overflow: hidden !important;
        border-radius: 8px !important;
    }

    .mil-img-frame img {
        position: relative !important;
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    /* Premium touch scroll optimization for list views */
    .mil-portfolio-item {
        margin-bottom: 60px !important;
    }

    /* Clean vertical spacing scale */
    .mil-p-30-120 {
        padding: 30px 0 60px 0 !important;
    }

    /* Safely offset back button and center title text on small viewports */
    .mil-banner-content h1 {
        padding-left: 48px !important;
        padding-right: 48px !important;
    }
}

/* Premium Back Button Centering Aligned inside H1 Title */
.mil-banner-content h1 a[title="Back to Home"] {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: inherit !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.7 !important;
    transition: opacity 0.3s ease !important;
    z-index: 10 !important;
}

.mil-banner-content h1 a[title="Back to Home"]:hover {
    opacity: 1 !important;
}

/* Premium Sway Idle Animations for Comparator Slider */
.ubc-comparator-container.mil-idle-sway .comparator-overlay {
    animation: milSwayOverlay 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
}

.ubc-comparator-container.mil-idle-sway .comparator-handle {
    animation: milSwayHandle 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
}

@keyframes milSwayOverlay {
    0% {
        clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
        -webkit-clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    }

    25% {
        clip-path: polygon(0 0, 43% 0, 43% 100%, 0 100%);
        -webkit-clip-path: polygon(0 0, 43% 0, 43% 100%, 0 100%);
    }

    75% {
        clip-path: polygon(0 0, 57% 0, 57% 100%, 0 100%);
        -webkit-clip-path: polygon(0 0, 57% 0, 57% 100%, 0 100%);
    }

    100% {
        clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
        -webkit-clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    }
}

@keyframes milSwayHandle {
    0% {
        left: 50%;
    }

    25% {
        left: 43%;
    }

    75% {
        left: 57%;
    }

    100% {
        left: 50%;
    }
}

/* Premium Click to Copy phone pointer and hover styles */
.mil-copy-phone {
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.mil-copy-phone:hover {
    color: var(--accent) !important;
    text-decoration: underline !important;
}

/* Mobile responsive typography scaling for page headers/banners */
@media (max-width: 768px) {

    .mil-banner-content h1,
    .mil-banner-content .mil-h1 {
        font-size: 26px !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 480px) {

    .mil-banner-content h1,
    .mil-banner-content .mil-h1 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        padding-left: 36px !important;
        padding-right: 36px !important;
    }
}


/* Responsive Image & Map Enhancements */
@media screen and (max-width: 767px) {

    .mil-portfolio-item .mil-cover-frame img,
    .ubc-project-img img,
    .mil-img-frame img,
    .mil-cover-frame {
        height: auto !important;
        object-fit: contain !important;
    }

    .mil-cover-frame,
    .mil-img-frame {
        padding-bottom: 0 !important;
        height: auto !important;
        background-color: transparent !important;
    }
}

/* Map Container */
.ubc-map-container {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ubc-map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Card Transitions */
.mil-portfolio-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mil-portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* RESTORED AND FIXED MOBILE HERO (CENTERED) */
@media screen and (max-width: 768px) {
    body.ubc-home .ubc-hero-section {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 0;
        display: flex;
        flex-direction: column;
        justify-content: center !important;
        background: #0b0b0b !important;
    }

    .ubc-hero-section .mil-banner-content {
        margin-bottom: 0 !important;
        margin-top: 10vh !important;
    }

    #about .mil-p-120-30 {
        padding-top: 15px !important;
    }

    body.ubc-home #ongoing,
    body.ubc-home #portfolio,
    body.ubc-home .ubc-editorial-section {
        background: #111111;
        position: relative;
        z-index: 10;
    }

    body.ubc-home #portfolio {
        background: #ffffff;
        position: relative;
        z-index: 10;
    }
}

.ubc-gallery-preview-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.ubc-gallery-item:hover .ubc-gallery-preview-thumbs {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.ubc-preview-thumb {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.ubc-preview-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Floating WhatsApp Button */
.mil-whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mil-whatsapp-floating:hover {
    background-color: #128C7E;
    color: #fff;
    transform: scale(1.1);
}

/* Mobile Responsiveness Enhancements */
@media screen and (max-width: 768px) {
    /* Adjust WhatsApp Icon size on mobile */
    .mil-whatsapp-floating {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    
    /* Fix header and footer padding on small screens */
    .mil-p-120-60 {
        padding-top: 60px !important;
        padding-bottom: 30px !important;
    }
    
    .mil-p-120-120 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    /* Ensure no extra space below footer and background color matches */
    body, html {
        background-color: #0b0b0b; 
    }
    
    .mil-top-panel {
        padding: 15px !important;
    }
    
    .mil-footer-menu ul li {
        margin-bottom: 15px;
    }
}
/* Fix Header Z-Index overlapping issues */
.mil-frame {
    z-index: 9990 !important;
}

.mil-menu-frame {
    z-index: 9991 !important;
}

.mil-progress-track,
.mil-ball {
    z-index: 9992 !important;
    .mil-img-frame img,
    .mil-cover-frame {
        height: auto !important;
        object-fit: contain !important;
    }

    .mil-cover-frame,
    .mil-img-frame {
        padding-bottom: 0 !important;
        height: auto !important;
        background-color: transparent !important;
    }
}

/* Map Container */
.ubc-map-container {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ubc-map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Card Transitions */
.mil-portfolio-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mil-portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* RESTORED AND FIXED MOBILE HERO (CENTERED) */
@media screen and (max-width: 768px) {
    body.ubc-home .ubc-hero-section {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 0;
        display: flex;
        flex-direction: column;
        justify-content: center !important;
        background: #0b0b0b !important;
    }

    .ubc-hero-section .mil-banner-content {
        margin-bottom: 0 !important;
        margin-top: 10vh !important;
    }

    #about .mil-p-120-30 {
        padding-top: 15px !important;
    }

    body.ubc-home #ongoing,
    body.ubc-home #portfolio,
    body.ubc-home .ubc-editorial-section {
        background: #111111;
        position: relative;
        z-index: 10;
    }

    body.ubc-home #portfolio {
        background: #ffffff;
        position: relative;
        z-index: 10;
    }
}

.ubc-gallery-preview-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.ubc-gallery-item:hover .ubc-gallery-preview-thumbs {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.ubc-preview-thumb {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.ubc-preview-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Floating WhatsApp Button */
.mil-whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mil-whatsapp-floating:hover {
    background-color: #128C7E;
    color: #fff;
    transform: scale(1.1);
}

/* Mobile Responsiveness Enhancements */
@media screen and (max-width: 768px) {
    /* Adjust WhatsApp Icon size on mobile */
    .mil-whatsapp-floating {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    
    /* Fix header and footer padding on small screens */
    .mil-p-120-60 {
        padding-top: 60px !important;
        padding-bottom: 30px !important;
    }
    
    .mil-p-120-120 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    /* Ensure no extra space below footer and background color matches ONLY on homepage */
    body.ubc-home, html.ubc-home {
        background-color: #0b0b0b !important; 
    }
    
    /* Ensure the menu icon stays visible (black everywhere) */
    .mil-menu-btn span,
    .mil-menu-btn span::before,
    .mil-menu-btn span::after {
        background: #000000 !important;
    }
    
    .mil-top-panel {
        padding: 15px !important;
    }
    
    .mil-footer-menu ul li {
        margin-bottom: 15px;
    }
}
/* Fix Header Z-Index overlapping issues */
.mil-frame {
    z-index: 9990 !important;
}

.mil-menu-frame {
    z-index: 9991 !important;
}

.mil-progress-track,
.mil-ball {
    z-index: 9992 !important;
}

.mil-whatsapp-floating {
    z-index: 9980 !important;
}
.mil-preloader {
    z-index: 99999 !important;
}

/* Remove scaling animation on page transition */
html.is-animating .mil-wrapper,
html.is-animating .mil-frame,
html.is-animating .mil-main-transition,
html.is-animating .mil-main-transition .mil-animation-frame,
html.is-animating .mil-main-transition .mil-lines-place {
    transform: none !important;
    -webkit-transform: none !important;
}

/* Add margin above page titles (Gallery, Blogs, etc) */
.mil-banner-sm .mil-banner-content h1 {
    margin-top: 1rem !important;
}

/* =========================================
   Global Responsive & Typography Polish
   ========================================= */

@media screen and (max-width: 768px) {
    /* Smoothly scale down headings globally */
    h1, .mil-h1 { font-size: 36px !important; line-height: 1.2 !important; }
    h2, .mil-h2 { font-size: 28px !important; line-height: 1.3 !important; }
    h3, .mil-h3 { font-size: 24px !important; line-height: 1.3 !important; }
    h4, .mil-h4 { font-size: 20px !important; line-height: 1.4 !important; }
    h5, .mil-h5 { font-size: 18px !important; line-height: 1.4 !important; }
    h6, .mil-h6 { font-size: 16px !important; line-height: 1.5 !important; }

    /* Scale down standard body text for readability */
    body, p, div.mil-text-sm {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    /* Reduce excessive vertical padding globally */
    .mil-p-120-120 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    .mil-p-30-120 {
        padding-top: 30px !important;
        padding-bottom: 60px !important;
    }
    .mil-p-120-60 {
        padding-top: 60px !important;
        padding-bottom: 30px !important;
    }

    /* Refine Blog Details Reading Experience */
    .ubc-blog-content {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }
    
    .ubc-blog-content h1, 
    .ubc-blog-content h2, 
    .ubc-blog-content h3 {
        margin-top: 30px !important;
        margin-bottom: 15px !important;
    }

    .ubc-blog-content p,
    .ubc-blog-content ul,
    .ubc-blog-content ol {
        margin-bottom: 15px !important;
    }

    .ubc-blog-content img {
        margin: 15px 0 !important;
    }
    
    /* Ensure breadcrumbs and small labels scale nicely */
    .mil-breadcrumbs li {
        font-size: 12px !important;
    }
    .mil-label {
        font-size: 10px !important;
    }
}