/* Small production-side corrections. Keep this file independent of Tailwind's build. */
.kht-long-heading,
.section-heading,
.kht-page-banner h1,
.kht-category-grid h3,
.kht-category-card-media + div h3 {
    hyphens: manual;
    overflow-wrap: anywhere;
    word-break: normal;
}

.kht-page-banner h1,
.section-heading {
    font-size: clamp(1.55rem, 6.5vw, 3.25rem);
    line-height: 1.12;
}

/* El fondo del hero y de las cabeceras es el azul de marca, rgb(74, 96, 112),
   que ya ponen .hero-pattern y el propio componente. No oscurecerlo aquí. */
.kht-home-hero .section-eyebrow,
.kht-home-hero .stat-chip,
.kht-home-hero .bg-black\/20 {
    border-color: rgba(255, 255, 255, .48) !important;
}

.kht-home-hero .text-accent-100,
.kht-home-hero .text-white\/90 {
    color: #fff !important;
}

.kht-home-hero a[href^="tel:"],
.kht-call-label {
    color: #fff !important;
    font-size: max(12px, 1em);
}

.kht-page-banner .text-primary-100,
.kht-page-banner .text-white\/90 {
    color: #fff !important;
}

.kht-banner-subtitle {
    text-wrap: balance;
}

.kht-breadcrumbs > div {
    white-space: normal;
    overflow-wrap: anywhere;
}

.kht-category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kht-category-grid > a {
    flex: 0 1 calc(33.333% - 1rem);
    min-width: 0;
}

.kht-subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kht-subcategory-grid > a {
    flex: 0 1 calc(25% - 1.125rem);
    min-width: 0;
}

.kht-supplier-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    min-height: 3.25rem;
}

.kht-supplier-chip img {
    display: block;
    width: auto;
    height: auto;
    max-width: 8rem;
    max-height: 2rem;
    object-fit: contain;
}

.kht-search-form,
.kht-search-form > div {
    min-width: 0;
}

.kht-search-form > div {
    display: flex;
    flex-wrap: wrap;
}

.kht-search-form input {
    flex: 1 1 12rem;
    min-width: 0;
}

.kht-search-form button {
    flex: 0 0 auto;
    min-height: 3rem;
}

.kht-supplier-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kht-supplier-grid > div {
    flex: 0 1 calc(33.333% - 1.5rem);
    min-width: 0;
}

.kht-news-empty {
    width: 100%;
}

/* «Vores partnere» (/diverse, /andre-ventiler): one column on mobile and two
   from 768 px, with the odd third card centred. The blades only carry
   «kht-partner-grid gap-8», so without these rules the cards stack with no gap. */
.kht-partner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kht-partner-grid > div {
    flex: 1 1 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .kht-partner-grid > div {
        flex: 0 1 calc(50% - 1rem);
    }
}

.kht-technical-icon {
    flex-shrink: 0;
}

.kht-about-logo {
    display: block;
    width: min(100%, 15rem);
    height: auto;
    max-height: 6rem;
    object-fit: contain;
    margin: 0 auto 1.5rem;
}

.kht-footer-logo {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 14rem);
    max-height: 4rem;
    object-fit: contain;
}

.kht-category-intro-copy {
    max-width: 70ch;
}

.kht-atex-subtitle {
    text-wrap: balance;
}

.kht-product-section--no-image {
    padding-top: 1rem;
}


.kht-delivery-content {
    padding-top: 4.0625rem !important;
    padding-bottom: 4.0625rem !important;
}

.kht-guide-card {
    padding: 1.25rem !important;
}

.kht-card-datasheet {
    margin-top: auto !important;
}

.kht-feature-link { display: block; border-radius: .75rem; }
.kht-feature-link > div { height: 100%; }
.kht-feature-link:focus-visible { outline: 2px solid #17364d; outline-offset: 3px; }

@media (max-width: 639px) {
    .kht-category-grid > a {
        flex-basis: 100%;
    }

    .kht-supplier-grid > div {
        flex-basis: 100%;
    }

    .kht-subcategory-grid > a {
        flex-basis: 100%;
    }

    .kht-page-banner h1,
    .section-heading {
        font-size: clamp(1.45rem, 7.5vw, 2.25rem);
    }

    .kht-about-logo {
        width: min(100%, 12rem);
        max-height: 4.5rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .kht-category-grid > a {
        flex-basis: calc(50% - .75rem);
    }

    .kht-supplier-grid > div {
        flex-basis: calc(50% - 1.5rem);
    }

    .kht-subcategory-grid > a {
        flex-basis: calc(50% - .75rem);
    }
}

/* Text containers must be allowed to shrink inside flex/grid cards. */
main :is(h1,h2,h3,h4,h5,h6) { min-width: 0; overflow-wrap: anywhere; hyphens: manual; }
main .flex > div { min-width: 0; }
main input, main textarea { min-width: 0; max-width: 100%; }
main p { overflow-wrap: break-word; }
.kht-guides-content { padding-block: 2rem; }
.kht-breadcrumbs :is(a,span) { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
.kht-breadcrumbs svg { flex-shrink: 0; }
#hero-carousel h3 { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.2; }
#produkter .section-title { font-size: clamp(1.75rem, 5vw, 3rem); overflow-wrap: anywhere; hyphens: manual; }
.kht-news-empty { padding: 1.5rem; }

.kht-delivery-content .card-premium { padding: clamp(1rem, 3vw, 3rem); }
.kht-delivery-content h2 > div { flex: 0 0 2.5rem; }
.kht-delivery-content p { max-width: 70ch; }
.kht-supplier-grid .card-premium { padding: 1.5rem; }
.kht-supplier-grid .card-premium > .flex { flex-wrap: wrap; }
.kht-category-grid > a > div { height: 100%; }
main .kht-product-section--no-image { align-self: start; }
main .kht-product-section--no-image .kht-card-datasheet { margin-top: 1rem !important; }

/* Icon holders next to a heading must keep their width (the min-width:0 rule above
   would otherwise let them shrink to 0 and the icon would overlap the heading). */
main .flex > div.hidden,
main .flex > div:has(> svg:only-child),
main .flex > div:has(> .w-16:only-child),
main .flex > div:has(> .w-12:only-child),
main .flex > div:has(> .w-10:only-child) { flex-shrink: 0; min-width: auto; }

/* Two product cards without photo side by side: same height and their
   "Se datablad" buttons on the same line. */
main .kht-product-section--no-image:has(+ .kht-product-section--no-image),
main .kht-product-section--no-image + .kht-product-section--no-image { align-self: stretch; }
main .kht-product-section--no-image:has(+ .kht-product-section--no-image) .kht-card-datasheet,
main .kht-product-section--no-image + .kht-product-section--no-image .kht-card-datasheet { margin-top: auto !important; }

/* Push-in POM (página del editor): el editor guardó estos colores solo para
   pantallas de hasta 1280 px; en PC grandes la caja de contacto, la cabecera
   «Produktvarianter» y la rayita de «Produktbeskrivelse» quedaban sin fondo
   (texto blanco sobre blanco). Mismo color en todas las anchuras. */
.dynamic-content #i5znj,
.dynamic-content #ii01y,
.dynamic-content #ire0fq { background-color: rgb(74, 96, 112); }

/* Restos de la revisión visual (1-oct, noche).
   1) Líneas de lectura de unos 70-90 caracteres en PC. «70ch» mide el ancho
      del cero de esta letra: en la práctica salían 88-110 caracteres en las
      introducciones de categoría y 119-139 en los recuadros de proveedores. */
.kht-category-intro-copy { max-width: 38rem; }
main .rounded-xl > a[target="_blank"] + p.leading-relaxed { max-width: 40rem; }
.kht-delivery-content p { max-width: 62ch; }
.kht-about-terms p { max-width: 40rem; }

/* 2) Una tarjeta sin foto junto a otra con foto no se estira hasta la altura
      de su vecina (la plantilla le pone h-full): queda compacta, sin el hueco
      blanco de ~450 px. Dos tarjetas sin foto juntas siguen igualadas (regla
      de arriba con align-self: stretch). */
main .kht-product-section--no-image { height: auto; }

/* 3) Nyheder en el móvil: el aviso «no hay noticias» ponía el icono en una
      columna al lado y el texto quedaba en 4 líneas estrechas. */
@media (max-width: 639px) {
    .kht-news-empty > .flex { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* 4) Selector de idioma con banderas (16-nov-2026, Christian): Dinamarca y Reino Unido en vez
      de «DA / EN». La activa, con marco azul de marca; la otra, algo apagada hasta pasar el ratón. */
.kht-flag { display: block; width: 26px; height: 17px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .18); }
.lang-switcher-ext a.kht-flag-link { display: inline-flex; align-items: center; padding: 3px !important; border-radius: 6px; border: 2px solid transparent; opacity: .55; transition: opacity .15s, border-color .15s; }
.lang-switcher-ext a.kht-flag-link:hover, .lang-switcher-ext a.kht-flag-link:focus-visible { opacity: 1; }
.lang-switcher-ext a.kht-flag-link.is-active { opacity: 1; border-color: rgb(74, 96, 112); }
.kht-flag-label { display: inline-flex; align-items: center; gap: .5rem; }
.kht-flag-label .kht-flag { width: 22px; height: 15px; }

/* Nyheder (20-nov-2026): opslag med billede, uafhængigt af Tailwind-buildet. */
.kht-news-post { margin-top: 2.5rem; border: 1px solid #e5e7eb; border-radius: 1rem; overflow: hidden; background: #fff; }
.kht-news-post + .kht-news-post { margin-top: 2rem; }
.kht-news-post__image { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: cover; background: rgb(30, 58, 95); }
.kht-news-post__body { padding: clamp(1.25rem, 4vw, 2.5rem); color: #4b5563; font-size: 1.0625rem; line-height: 1.7; }
.kht-news-post__body > p { margin: 0 0 1rem; }
.kht-news-post__date { display: block; font-size: .875rem; font-weight: 600; letter-spacing: .02em; color: rgb(74, 96, 112); margin-bottom: .5rem; }
.kht-news-post__title { font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.25; font-weight: 700; color: #111827; margin: 0 0 1.25rem; }
.kht-news-post__contact { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .35rem; }
.kht-news-post__contact a { color: rgb(74, 96, 112); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.kht-news-post__contact a:hover { color: #111827; }
.kht-news-post__signature { font-weight: 600; color: #111827; margin-bottom: 0 !important; }
@media (max-width: 640px) {
    .card-premium:has(> .kht-news-post) { padding: 1.25rem !important; }
    .kht-news-post { margin-top: 1.5rem; }
    .kht-news-post__body { padding: 1.25rem; font-size: 1rem; }
}
.kht-nowrap { white-space: nowrap; }
