/*
 * Shared presentation rules for the existing Ferrobend hero families.
 * Opt-in attributes keep these rules out of navigation, drawings and tables.
 * Existing page styles retain all colors, backgrounds, borders and effects.
 */
[data-ferrobend-hero] {
    --fb-hero-space: 24px;
    --fb-hero-gap: 16px;
    box-sizing: border-box;
}

[data-ferrobend-hero] h1 {
    font-family: inherit;
    overflow-wrap: break-word;
    min-width: 0;
}

[data-ferrobend-hero] p {
    overflow-wrap: break-word;
}

/* Product and landing heroes retain their existing split content/image layout. */
[data-ferrobend-hero="marketing"] {
    padding-top: 60px;
    padding-bottom: 60px;
}

[data-ferrobend-hero="marketing"] :is(.hero-container, .product-hero-container) {
    width: 92%;
    max-width: 1380px;
    margin-inline: auto;
    gap: 60px;
}

[data-ferrobend-hero="marketing"] :is(.hero-content, .product-hero-content) {
    min-width: 0;
}

[data-ferrobend-hero="marketing"] h1 {
    font-size: clamp(32px, 3.5vw, 50px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: normal;
    margin: 0 0 var(--fb-hero-space);
}

[data-ferrobend-hero="marketing"] h1 .hero-line {
    white-space: normal;
}

[data-ferrobend-hero="marketing"] :is(.hero-top-text, .dimensions-hero-badge) {
    margin: 0 0 var(--fb-hero-gap);
    line-height: 1.5;
    flex-wrap: wrap;
}

[data-ferrobend-hero="marketing"] p {
    font-size: 18px;
    line-height: 1.8;
    margin-top: 0;
    margin-bottom: var(--fb-hero-space);
}

[data-ferrobend-hero="marketing"] :is(.hero-certifications, .standard-badges, .dimensions-hero-stats) {
    margin-top: 0;
    margin-bottom: var(--fb-hero-space);
}

[data-ferrobend-hero="marketing"] :is(.hero-buttons, .hero-actions, .dimensions-hero-buttons) {
    gap: var(--fb-hero-gap);
    flex-wrap: wrap;
}

[data-ferrobend-hero="marketing"] :is(.hero-buttons, .hero-actions, .dimensions-hero-buttons) a {
    box-sizing: border-box;
    min-height: 52px;
    max-width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
}

/* Existing product photos only; technical hero drawings keep their own rules. */
[data-ferrobend-hero="marketing"] :is(.hero-image, .product-hero-image) {
    min-width: 0;
    align-items: center;
}

[data-ferrobend-hero="marketing"] :is(.hero-image, .product-hero-image) img {
    width: 100%;
    max-width: 620px;
    height: auto;
    object-fit: contain;
    transform: none;
}

/* Standard selectors remain compact; no marketing layout is imposed on them. */
[data-ferrobend-hero="compact"] {
    padding: 24px;
    gap: var(--fb-hero-space);
}

[data-ferrobend-hero="compact"] h1 {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

[data-ferrobend-hero="compact"] p {
    font-size: 14px;
    line-height: 1.6;
    margin: 8px 0 0;
}

/* Simple centered page titles keep their existing alignment and containers. */
[data-ferrobend-hero="title"] {
    padding: 28px 32px;
}

[data-ferrobend-hero="title"] h1 {
    font-size: clamp(26px, 2.5vw, 32px);
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

/* Keep the weights page's smaller two-column presentation and image intact. */
[data-ferrobend-hero="feature"] {
    padding-top: 38px;
    padding-bottom: 38px;
}

[data-ferrobend-hero="feature"] h1 {
    font-size: clamp(28px, 3.5vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 16px;
}

[data-ferrobend-hero="feature"] p {
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 var(--fb-hero-space);
}

[data-ferrobend-hero="feature"] .weights-hero-buttons {
    flex-wrap: wrap;
    gap: var(--fb-hero-gap);
}

/* The search form and live results are outside this introductory text block. */
[data-ferrobend-hero="intro"] h1 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
}

[data-ferrobend-hero="intro"] p {
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
}

/* Only the existing breadcrumb immediately accompanying a hero opts in. */
[data-ferrobend-breadcrumb] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

[data-ferrobend-breadcrumb] > :is(a, span, strong, i) {
    margin-inline: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

@media (max-width: 1024px) {
    [data-ferrobend-hero="marketing"] {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    [data-ferrobend-hero="marketing"] :is(.hero-container, .product-hero-container) {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    [data-ferrobend-hero="marketing"] {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    [data-ferrobend-hero="marketing"] :is(.hero-container, .product-hero-container) {
        gap: 32px;
    }

    [data-ferrobend-hero="marketing"] p {
        font-size: 16px;
        line-height: 1.8;
    }

    [data-ferrobend-hero="marketing"] :is(.hero-image, .product-hero-image) img {
        max-width: 420px;
    }

    [data-ferrobend-hero="compact"] {
        padding: 20px;
        gap: 16px;
    }

    [data-ferrobend-hero="title"] {
        padding: 24px 22px;
    }

    [data-ferrobend-breadcrumb] {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    [data-ferrobend-hero="marketing"] :is(.hero-container, .product-hero-container) {
        width: calc(100% - 32px);
    }

    [data-ferrobend-hero="marketing"] :is(.hero-buttons, .hero-actions, .dimensions-hero-buttons) a {
        padding: 14px 20px;
        font-size: 15px;
    }

    [data-ferrobend-hero="compact"] {
        padding: 20px 16px;
    }

    [data-ferrobend-hero="title"] {
        padding: 22px 16px;
    }
}
