
/*=========================================================
Tool Hero Layout
=========================================================*/

.tx-tool-hero{

    display:grid;

    grid-template-columns:1.15fr 0.85fr;

    gap:48px;

    align-items:center;

    width:100%;

    max-width:1400px;

    margin:0 auto 80px;

    padding:48px;

    border-radius:26px;

    background:linear-gradient(
    180deg,
    #f8fcff,
    #eef7ff
    );

    box-shadow:
0 18px 45px rgba(15,23,42,.10);

    overflow:hidden;

    position:relative;

}

.tx-tool-hero::before{

    content:"";

    position:absolute;

    inset:0;

    background:
        linear-gradient(
            135deg,
            rgba(16,185,129,.05),
            rgba(59,130,246,.04)
        );

    pointer-events:none;

}

.tx-tool-hero>*{

    position:relative;

    z-index:1;

}



/*=========================================================
Hero Columns
=========================================================*/

.tx-tool-hero-content{

    display:flex;

    flex-direction:column;

    gap:24px;

    min-width:0;

}

.tx-tool-hero-preview{

    display:flex;

    justify-content:center;

    align-items:center;

    min-width:0;

}

/*=========================================================
Tool Hero Typography
=========================================================*/

.tx-tool-title{
    display:flex;
    align-items:center;
    gap:12px;

    font-size:2.35rem;
    font-weight:800;
    line-height:1.15;
    color:#0f172a;

    letter-spacing:-0.03em;

    margin:8px 0;
}

.tx-tool-subtitle{

    font-size:1.2rem;

    font-weight:600;

    color:#334155;

    margin-bottom:10px;

}

.tx-tool-description{

    font-size:1.05rem;

    line-height:1.8;

    color:#475569;

    max-width:640px;

}

.tx-tool-statistics{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:18px;

    margin-top:10px;

}

.tx-tool-stat{

    background:#ffffff;

    border-radius:18px;

    padding:18px;

    text-align:center;

    border:1px solid #e5e7eb;

    box-shadow:0 8px 20px rgba(15,23,42,.05);

    transition:
    transform .3s,
    box-shadow .3s;


}


.tx-tool-stat:hover{

    transform:translateY(-4px);

    box-shadow:0 16px 35px rgba(16,185,129,.12);

}

.tx-tool-stat strong{

    display:block;

    font-size:1.35rem;

    font-weight:800;

    color:#10b981;

}

.tx-tool-stat span{

    display:block;

    margin-top:6px;

    font-size:.9rem;

    color:#64748b;

}

.tx-primary-button{

    background:linear-gradient(135deg,#10b981,#059669);

    color:#fff;

    border:none;

    border-radius:14px;

    padding:14px 28px;

    font-weight:700;

    cursor:pointer;

    transition:all .25s ease;

}

.tx-primary-button:hover{

    transform:translateY(-3px);

    box-shadow:0 16px 34px rgba(16,185,129,.35);

}

.tx-secondary-button{

    background:#fff;

    color:#0f172a;

    border:2px solid #d1d5db;

    border-radius:14px;

    padding:14px 28px;

    font-weight:700;

    cursor:pointer;

    transition:all .25s ease;

}

.tx-secondary-button:hover{

    transform:translateY(-2px);

    border-color:#10b981;

    color:#10b981;

}


.tx-tool-preview-card:hover{

    transform:translateY(-8px);

    box-shadow:

        0 30px 80px rgba(15,23,42,.12);

}


.tx-tool-preview-image{

    display:block;

    width:100%;

    height:auto;

    border-radius:18px;

    transition:transform .35s ease;


}



.tx-tool-actions{

    display:flex;

    gap:18px;

    flex-wrap:wrap;

    margin-top:14px;

}


/*=========================================================
Tool Preview
=========================================================*/

.tx-tool-preview-card{

    background:#fff;

    border-radius:28px;

    padding:20px;

    box-shadow:
        0 18px 60px rgba(15,23,42,.08);

    transition:
        transform .35s ease,
        box-shadow .35s ease;
    width:100%;

    max-width:520px;

    display:flex;

    justify-content:center;

    align-items:center;

    cursor:pointer;

}

.tx-tool-preview-card:hover .tx-tool-preview-image{

    transform:scale(1.03);

}

.tx-tool-preview-placeholder{

    width:100%;

    min-height:360px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:26px;

    background:linear-gradient(135deg,#eff6ff,#ecfeff);

    font-size:2rem;

    font-weight:700;

    color:#2563eb;

}

/*=========================================================
Dark Mode
=========================================================*/

body.dark-mode .tx-tool-hero{

    background:linear-gradient(
        180deg,
        #182233,
        #111827
    );

    border:1px solid rgba(255,255,255,.06);

    box-shadow:
        0 18px 45px rgba(0,0,0,.45);

}

body.dark-mode .tx-tool-title{

    color:#f8fafc;

}

body.dark-mode .tx-tool-subtitle{

    color:#cbd5e1;

}

body.dark-mode .tx-tool-description{

    color:#94a3b8;

}

/* =========================================================
   TOOLXONE HERO — INTELLIGENT RESPONSIVE SYSTEM
   Mission 3.2.6
   ========================================================= */

/*
   IMPORTANT:
   This layer controls ONLY the ToolXone tool hero.
   It does not modify the calculator keypad/card.
*/


/* =========================================================
   GLOBAL HERO SAFETY
   ========================================================= */

.tx-tool-hero,
.tx-tool-hero * {
    box-sizing: border-box;
}

.tx-tool-hero {
    width: min(100%, 1400px);
    max-width: 1400px;
    min-width: 0;

    margin-left: auto;
    margin-right: auto;

    overflow: hidden;
}

.tx-tool-hero > * {
    min-width: 0;
}

.tx-tool-hero-content,
.tx-tool-hero-preview {
    min-width: 0;
    max-width: 100%;
}


/* =========================================================
   TITLE SAFETY
   Prevent long titles from forcing horizontal overflow.
   ========================================================= */

.tx-tool-title {
    min-width: 0;
    max-width: 100%;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    overflow-wrap: anywhere;
    word-break: normal;
}

.tx-tool-subtitle,
.tx-tool-description {
    min-width: 0;
    max-width: 100%;

    overflow-wrap: anywhere;
}


/* =========================================================
   PREVIEW SAFETY
   ========================================================= */

.tx-tool-hero-preview {
    width: 100%;
    min-width: 0;
}

.tx-tool-preview-card {
    width: 100%;
    max-width: 520px;
    min-width: 0;
}

.tx-tool-preview-image {
    width: 100%;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   STATISTICS — DESKTOP BASE
   ========================================================= */

.tx-tool-statistics {
    width: 100%;
    min-width: 0;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.tx-tool-stat {
    min-width: 0;
    max-width: 100%;
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.tx-tool-actions {
    width: 100%;
    min-width: 0;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.tx-primary-button,
.tx-secondary-button {
    max-width: 100%;
}


/* =========================================================
   TABLET
   769px → 1024px
   ========================================================= */

@media (max-width: 1024px) {

    .tx-tool-hero {
        grid-template-columns:
            minmax(0, 1.1fr)
            minmax(260px, .9fr);

        gap: 32px;

        padding: 36px;
    }

    .tx-tool-title {
        font-size: clamp(
            2rem,
            4vw,
            2.35rem
        );
    }

    .tx-tool-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .tx-tool-statistics {
        gap: 12px;
    }

    .tx-tool-stat {
        padding: 15px 12px;
    }

    .tx-tool-actions {
        gap: 12px;
    }

}


/* =========================================================
   COMPACT TABLET / LARGE MOBILE
   769px and below
   ========================================================= */

@media (max-width: 768px) {

    .tx-tool-hero {

        /*
         * Desktop two-column hero becomes
         * a clean vertical flow.
         */
        grid-template-columns: 1fr;

        width: calc(100% - 32px);
        max-width: 100%;

        gap: 28px;

        margin-left: auto;
        margin-right: auto;

        padding: 28px 24px;

        border-radius: 22px;
    }


    /* -----------------------------------------------------
       Hero content
       ----------------------------------------------------- */

    .toolxone-tool-hero-content {
        width: 100%;
        max-width: 100%;

        gap: 18px;
    }


    /* -----------------------------------------------------
       Hero preview
       ----------------------------------------------------- */

    .tx-tool-hero-preview {
        width: 100%;
        max-width: 100%;

        order: 2;
    }

    .tx-tool-preview-card {
        width: min(100%, 520px);
        margin-left: auto;
        margin-right: auto;
    }


    /* -----------------------------------------------------
       Typography
       ----------------------------------------------------- */

    .tx-tool-title {
        font-size: clamp(
            2rem,
            5vw,
            2.35rem
        );

        line-height: 1.12;

        gap: 10px;
    }

    .tx-tool-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .tx-tool-description {
        font-size: 1rem;
        line-height: 1.7;
    }


    /* -----------------------------------------------------
       Statistics → 2 × 2
       ----------------------------------------------------- */

    .tx-tool-statistics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;

        width: 100%;
    }

    .tx-tool-stat {
        width: 100%;
        padding: 16px 10px;

        border-radius: 16px;
    }

    .tx-tool-stat strong {
        font-size: 1.2rem;
    }

    .tx-tool-stat span {
        font-size: .85rem;
    }


    /* -----------------------------------------------------
       CTA buttons
       ----------------------------------------------------- */

    .tx-tool-actions {
        width: 100%;

        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .tx-primary-button,
    .tx-secondary-button {
        width: 100%;
        min-width: 0;
    }

}


/* =========================================================
   MOBILE
   480px and below
   ========================================================= */

@media (max-width: 480px) {

    .tx-tool-hero {

        width: calc(100% - 20px);

        padding: 22px 18px;

        gap: 24px;

        border-radius: 20px;

        margin-bottom: 48px;
    }


    /* -----------------------------------------------------
       Content spacing
       ----------------------------------------------------- */

    .toolxone-tool-hero-content {
        gap: 15px;
    }


    /* -----------------------------------------------------
       Title
       ----------------------------------------------------- */

    .tx-tool-title {

        font-size: clamp(
            1.75rem,
            8vw,
            2rem
        );

        line-height: 1.12;

        gap: 8px;

        margin: 4px 0;
    }


    .tx-tool-subtitle {
        font-size: 1rem;
        line-height: 1.45;

        margin-bottom: 4px;
    }


    .tx-tool-description {

        font-size: .95rem;

        line-height: 1.65;

        max-width: 100%;
    }


    /* -----------------------------------------------------
       Statistics
       ----------------------------------------------------- */

    .tx-tool-statistics {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

        margin-top: 4px;
    }


    .tx-tool-stat {

        padding: 14px 8px;

        border-radius: 15px;
    }


    .tx-tool-stat strong {
        font-size: 1.1rem;
    }


    .tx-tool-stat span {
        font-size: .78rem;
        line-height: 1.35;
    }


    /* -----------------------------------------------------
       Buttons → vertical mobile flow
       ----------------------------------------------------- */

    .tx-tool-actions {

        grid-template-columns: 1fr;

        gap: 10px;

        margin-top: 4px;
    }


    .tx-primary-button,
    .tx-secondary-button {

        width: 100%;

        padding:
            13px 18px;

        font-size: .95rem;
    }


    /* -----------------------------------------------------
       Preview
       ----------------------------------------------------- */

    .tx-tool-preview-card {

        max-width: 100%;

        padding: 12px;

        border-radius: 20px;
    }

    .tx-tool-preview-image {
        border-radius: 14px;
    }

}


/* =========================================================
   SMALL PHONES
   390px and below
   ========================================================= */

@media (max-width: 390px) {

    .tx-tool-hero {

        width: calc(100% - 16px);

        padding:
            20px 15px;

        gap: 21px;
    }


    .tx-tool-title {

        font-size:
            clamp(
                1.55rem,
                8vw,
                1.85rem
            );

        gap: 7px;
    }


    .tx-tool-subtitle {
        font-size: .95rem;
    }


    .tx-tool-description {
        font-size: .9rem;
        line-height: 1.6;
    }


    .tx-tool-statistics {
        gap: 8px;
    }


    .tx-tool-stat {
        padding: 13px 6px;
    }


    .tx-tool-stat strong {
        font-size: 1rem;
    }


    .tx-tool-stat span {
        font-size: .74rem;
    }


    .tx-primary-button,
    .tx-secondary-button {
        padding:
            12px 15px;

        font-size: .9rem;
    }

}


/* =========================================================
   ULTRA-SMALL PHONES
   360px and below
   ========================================================= */

@media (max-width: 360px) {

    .tx-tool-hero {

        width: calc(100% - 12px);

        padding:
            18px 12px;
    }


    .tx-tool-title {
        font-size: 1.5rem;
    }


    .tx-tool-statistics {
        gap: 7px;
    }


    .tx-tool-stat {
        padding:
            12px 5px;
    }

}

/* ==========================================================
   ToolXone Hero Preview Image
   Constrain generated tool preview images
========================================================== */

.tx-tool-hero-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.tx-tool-hero-preview-content {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tx-tool-hero-preview-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 430px;
    object-fit: contain;
    border-radius: 16px;
}

/* ==========================================================
   Preview Text
========================================================== */

.tx-hero-preview-title {
    margin-top: 12px;
    font-weight: 700;
    text-align: center;
}

.tx-hero-preview-description {
    margin-top: 6px;
    text-align: center;
    opacity: 0.8;
}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width: 768px) {

    .tx-tool-hero-preview {
        width: 100%;
    }

    .tx-tool-hero-preview-image {
        width: 100%;
        max-width: 100%;
        max-height: 320px;
    }

}

/* ==========================================================
   ToolXone Hero Preview — Image Containment Fix
========================================================== */

.tx-tool-hero-preview {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;

    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-tool-hero-preview img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: 430px;

    object-fit: contain !important;
    object-position: center center !important;

    margin: 0 auto !important;
}