/* ==========================================================
   JT MAISON — Global Boxed Layout
   ========================================================== */

:root {
    --jtm-container-max: 1300px;
    --jtm-container-padding: 40px;
}

/* Base container rule */
.jtm-boxed-content {
    max-width: var(--jtm-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--jtm-container-padding);
    padding-right: var(--jtm-container-padding);
    box-sizing: border-box;
    width: 100%;
}

/* Apply to Header */
.jtm-header__bar {
    width: 100%;
}

/* Apply to Hero */
.elementor-widget-jtmaison_hero,
.elementor-widget-jtmaison_hero .elementor-widget-container {
    width: 100% !important;
}

.jtm-hero__inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 80px 0 !important;
    align-items: flex-start !important; /* Pushes flex items to the left */
    height: 100%;
    box-sizing: border-box !important;
}

.jtm-hero__content, 
.jtm-hero__content h1, 
.jtm-hero__content p,
.jtm-hero__content div {
    text-align: left !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
}

/* Apply to Signature Venture */
.jtm-venture {
    padding-top: 0 !important;
}

/* Transparency when no image is selected */
.jtm-venture:has(.jtm-venture__card[style*="url('')"]),
.jtm-venture:has(.jtm-venture__card:not([style*="url"])) {
    background: transparent !important;
}

.jtm-venture__card[style*="url('')"],
.jtm-venture__card:not([style*="url"]) {
    background: transparent !important;
}

.jtm-venture__card[style*="url('')"] .jtm-venture__overlay,
.jtm-venture__card:not([style*="url"]) .jtm-venture__overlay {
    display: none !important;
}

/* Force Full Width on Desktop to allow Elementor margin control */
@media (min-width: 1025px) {
    .jtm-venture,
    .jtm-venture__inner,
    .jtm-venture__header,
    .jtm-venture__content,
    .jtm-work,
    .jtm-work__header,
    .jtm-work__grid,
    .jtm-banner__inner,
    .jtm-quote-sec__inner,
    .jtm-process,
    .jtm-process__inner,
    .jtm-process__header,
    .jtm-testimonials__inner,
    .jtm-final-cta__inner,
    .jtm-footer__inner,
    .jtm-branding-intro__inner,
    .jtm-ecosystem__inner,
    .jtm-results__inner,
    .jtm-project-hero__inner,
    .jtm-project-info__inner,
    .jtm-project-intro__inner,
    .jtm-project-disciplines__inner,
    .jtm-project-brief__inner,
    .jtm-breadcrumb__inner,
    .jtm-brands-carousel,
    .jtm-brands-carousel__inner,
    .jtm-beliefs,
    .jtm-beliefs__inner,
    .jtm-founder,
    .jtm-founder__inner {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Handle full-width backgrounds */
/* Sections like banner or hero might have a background that should stay full width */
/* We already target the __inner classes which are children of the full-width sections */

/* Special case for Draggable Carousel / Project Carousel */
.jtm-draggable-carousel__header,
.jtm-project-carousel__header {
    width: 100%;
    max-width: none;
    margin: 0 0 40px 0;
    padding: 0;
}

/* Signature Venture needs care as it's often centered */
.jtm-venture__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    :root {
        --jtm-container-padding: 24px;
    }

    /* GLOBAL HEADER CENTERING (Mobile/Tablet Only) */
    [class*="__header"],
    [class*="__title"],
    [class*="__subtitle"] {
        text-align: center !important;
        align-items: center !important;
    }

    [class*="__header"] {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Allow centering on mobile/tablet */
    .jtm-hero__content, 
    .jtm-hero__content h1, 
    .jtm-hero__content p,
    .jtm-hero__content div {
        text-align: center !important;
    }
    
    .jtm-hero__inner {
        align-items: center !important;
    }

    /* Signature Venture mobile centering */
    .jtm-venture__aside,
    .jtm-venture__main,
    .jtm-venture__content {
        align-items: center !important;
        text-align: center !important;
    }
}
