:root {
    color-scheme: light;
    --charcoal: #383a3a;
    --muted: #646b6b;
    --red: #b7161f;
    --red-dark: #8f1119;
    --line: #d9dddd;
    --surface: #f7f8f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; color: var(--charcoal); background: #fff; font-family: Inter, "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #c93a42; outline-offset: 3px; }
.page-width { width: min(1396px, calc(100% - 48px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 20; height: 72px; background: #fff; border-bottom: 1px solid #e5e7e7; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.header-primary { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: auto; height: 44px; }
.header-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 700; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-left: auto; white-space: nowrap; }
.header-nav a:not(.button):hover, .nav-button:hover { color: var(--red); }
.nav-button { padding: 0; border: 0; background: none; color: inherit; font-weight: 600; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 26px; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 4px; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; transition: background .15s ease, border-color .15s ease; }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button-small { min-height: 37px; min-width: 124px; padding-inline: 18px; }

.hero { height: 385px; background: linear-gradient(90deg, rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 54%) 38%, rgb(0 0 0 / 20%) 72%, rgb(0 0 0 / 12%) 100%), url('/assets/hero-plant.webp') center center / cover no-repeat; background-color: #383a3a; border-bottom: 1px solid #e5e7e7; }
.hero-inner { display: flex; align-items: center; height: 100%; }
.hero-copy { width: min(515px, 45%); padding-bottom: 3px; }
.hero h1 { max-width: 500px; margin: 0; font-size: clamp(39px, 3.35vw, 53px); font-weight: 800; letter-spacing: -.045em; line-height: .97; }
.hero-subtitle { margin: 9px 0 0; color: #555d5d; font-size: clamp(17px, 1.43vw, 22px); font-weight: 700; line-height: 1.2; }
.hero-rule { display: block; width: 42px; height: 3px; margin-top: 17px; background: var(--red); }
.hero-description { max-width: 500px; margin: 15px 0 15px; color: #626a6a; font-size: 16px; font-weight: 500; line-height: 1.4; }
@media (min-width: 761px) {
    .hero h1, .hero-subtitle, .hero-description { color: #fff; }
}
.hero-button { min-width: 184px; }

.filter-strip { background: var(--surface); border-bottom: 1px solid #e5e7e7; }
.filter-form { min-height: 95px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding-block: 18px; }
.filter-form h2 { flex: none; margin: 0; padding-right: 22px; border-right: 1px solid var(--line); font-size: 26px; font-weight: 800; letter-spacing: -.045em; }
.filter-categories { min-width: 0; flex: 1; padding: 0; margin: 0; border: 0; }
.filter-categories legend, .filter-location label, .filter-search label, .filter-product-category label { display: block; padding: 0; margin-bottom: 5px; font-size: 14px; font-weight: 800; }
.category-options { display: flex; align-items: center; gap: 15px; }
.category-option { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: #626a6a; font-size: 14px; font-weight: 500; cursor: pointer; }
.category-option input { flex: none; appearance: none; width: 19px; height: 19px; margin: 0; border: 1.5px solid #737b7b; border-radius: 3px; background: #fff; cursor: pointer; }
.category-option input:checked { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 4px #fff; }
.filter-search { width: 160px; flex: none; }
.filter-search input { width: 100%; height: 42px; padding: 0 13px; color: #555d5d; background: #fff; border: 1px solid #d6dada; border-radius: 4px; }
.filter-location { width: 185px; flex: none; }
.filter-location-country { width: 280px; }
.filter-location select, .filter-product-category select { width: 100%; height: 42px; padding: 0 15px; color: #555d5d; background: #fff; border: 1px solid #d6dada; border-radius: 4px; }
.filter-button { width: 120px; flex: none; margin-top: 18px; }
.clear-link { flex: none; margin-top: 18px; color: var(--red); font-size: 15px; text-decoration: underline; text-underline-offset: 2px; }
.clear-link:hover { color: var(--red-dark); }

.catalog { position: relative; padding-top: 26px; padding-bottom: 48px; }
.catalog-section + .catalog-section { margin-top: 40px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.045em; line-height: 1.2; }
.section-heading a { color: var(--red); font-size: 13px; font-weight: 600; white-space: nowrap; }
.section-heading a:hover { color: var(--red-dark); text-decoration: underline; }
.company-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.company-card { position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 22px rgb(56 58 58 / 7%); }
.card-location-badge { position: absolute; top: 15px; left: 15px; z-index: 1; display: block; width: max-content; max-width: calc(100% - 30px); padding: 8px 12px; overflow: hidden; background: rgb(255 255 255 / 96%); border-radius: 6px; box-shadow: 0 2px 10px rgb(0 0 0 / 12%); color: var(--charcoal); font-size: 12px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.card-image-frame { position: relative; }
.card-image-link { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e5e8e8; }
.card-image-link img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.company-card:hover .card-image-link img { transform: scale(1.035); }
.media-credit { position: absolute; z-index: 2; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 5px 8px; border-radius: 3px; background: rgb(255 255 255 / 93%); color: #383a3a; font-size: 11px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.media-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.card-details { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 16px 18px 18px; }
.card-details h3 { display: -webkit-box; overflow: hidden; margin: 0 0 7px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 21px; font-weight: 800; letter-spacing: -.035em; line-height: 1.18; }
.card-details h3 a:hover { color: var(--red); }
.card-products { padding: 0; margin: 0 0 10px; color: #5d6565; font-size: 13px; font-weight: 600; line-height: 1.4; list-style: none; }
.card-products li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-products li + li { margin-top: 3px; }
.card-products li::before { content: "•"; margin-right: 8px; color: var(--red); }
.card-products .card-products-more { color: var(--red); font-size: 13px; }
.portfolio-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 42px; padding: 8px 12px; margin-top: auto; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 4px; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; }
.portfolio-link:hover { color: #fff; background: var(--red-dark); border-color: var(--red-dark); }
.empty-state { margin: 0; padding: 28px; color: #626a6a; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 15px; }
.site-footer { padding: 23px 0; color: #687070; border-top: 1px solid var(--line); font-size: 13px; }
.site-footer a { color: var(--red); font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 1420px) {
    .header-nav { gap: 22px; }
    .filter-form { flex-wrap: wrap; gap: 18px 28px; padding-block: 18px; }
    .filter-form h2 { padding-right: 28px; }
    .filter-categories { flex-basis: calc(100% - 185px); }
    .filter-button, .clear-link { margin-top: 0; }
    .hero-copy { width: 54%; }
}
@media (max-width: 1100px) {
    .company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    html { scroll-padding-top: 145px; }
    .site-header { height: auto; }
    .header-inner { height: auto; min-height: 72px; flex-wrap: wrap; gap: 14px 20px; padding-block: 12px; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 130px; }
    .page-width { width: min(100% - 32px, 560px); }
    .header-inner { flex-direction: column; align-items: stretch; gap: 12px; padding-block: 13px; }
    .header-primary { flex-wrap: wrap; gap: 12px 24px; }
    .brand img { height: 38px; }
    .header-nav { flex-wrap: wrap; justify-content: flex-start; gap: 12px 18px; font-size: 14px; }
    .header-actions { width: 100%; flex-wrap: wrap; gap: 12px 15px; margin-left: 0; white-space: normal; }
    .button-small { min-height: 34px; min-width: auto; padding-inline: 12px; font-size: 12px; }
    .hero { height: auto; min-height: 415px; background-position: 61% center; }
    .hero-inner { align-items: flex-start; padding-block: 38px; }
    .hero-copy { width: min(430px, 100%); padding: 18px; background: rgb(255 255 255 / 90%); border-radius: 4px; }
    .hero h1 { font-size: clamp(36px, 9vw, 48px); }
    .hero-subtitle { font-size: 17px; }
    .hero-description { max-width: 340px; font-size: 14px; }
    .filter-form { align-items: stretch; gap: 18px; }
    .filter-form h2 { width: 100%; padding: 0; border: 0; font-size: 24px; }
    .filter-categories { flex-basis: 100%; }
    .category-options { flex-wrap: wrap; gap: 12px 20px; }
    .filter-location, .filter-search, .filter-product-category { width: 100%; }
    .filter-button { width: auto; flex: 1; }
    .clear-link { align-self: center; padding: 10px; }
    .catalog { padding-top: 22px; }
    .catalog-section + .catalog-section { margin-top: 32px; }
    .section-heading { margin-bottom: 14px; }
    .section-heading h2 { font-size: 25px; }
    .company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .card-details { padding: 15px 16px 16px; }
    .card-details h3 { font-size: 19px; }
}
@media (max-width: 620px) {
    .company-grid { grid-template-columns: 1fr; }
    .company-card { width: 100%; max-width: 480px; margin-inline: auto; }
}

@media (max-width: 520px) {
    html { scroll-padding-top: 200px; }
    .header-primary { display: block; }
    .header-nav { margin-top: 14px; }
    .hero { min-height: 445px; background-position: 54% center; }
    .hero-copy { width: 100%; }
    .hero h1 { max-width: 340px; }
    .hero-description { max-width: 290px; }

    .section-heading { align-items: flex-end; }
    .section-heading h2 { max-width: 70%; }
}

.directory { min-height: calc(100vh - 139px); padding-block: 48px 72px; }
.directory h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -.045em; }
.directory-intro { max-width: 720px; margin: 10px 0 30px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.directory-count { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.directory .filter-strip { margin: 28px 0 24px; border: 1px solid var(--line); border-radius: 4px; }
.directory .filter-form { padding: 18px; }
.directory .facility-type-details { flex: 0 0 100%; }
.directory .facility-type-details summary { width: max-content; color: var(--charcoal); font-size: 14px; font-weight: 800; cursor: pointer; }
.directory .filter-categories { margin-top: 10px; }
.directory .category-options { flex-wrap: wrap; }
.directory .filter-button { white-space: nowrap; }
@media (min-width: 1421px) {
    .directory .filter-form { gap: 12px; }
    .directory .filter-search { width: 150px; }
    .directory .filter-location-country { width: 210px; }
    .directory .filter-location:not(.filter-location-country) { width: 175px; }
    .directory .filter-button { width: 140px; }
}
.directory-company { font-weight: 700; }
.directory-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.directory-item { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.directory-media { position: relative; flex: none; min-width: 0; }
.directory-image-link { display: block; height: 220px; overflow: hidden; background: var(--surface); }
.directory-image-link img { display: block; width: 100%; height: 100%; object-fit: cover; }
.directory-image-empty { display: grid; place-content: center; height: 100%; padding: 22px; overflow-wrap: anywhere; color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.4; text-align: center; }
.directory-content { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 22px; }
.directory-item h2 { margin: 0; overflow-wrap: anywhere; font-size: 21px; line-height: 1.25; }
.directory-item h2 a:hover, .directory-view:hover { color: var(--red-dark); text-decoration: underline; }
.directory-item p { margin: 10px 0; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; line-height: 1.5; }
.directory-view { display: block; align-self: flex-start; margin-top: auto; padding-top: 12px; color: var(--red); font-size: 14px; font-weight: 700; }
.directory-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; font-size: 14px; }
.directory-pagination a { color: var(--red); font-weight: 700; }
.directory-pagination a:hover { color: var(--red-dark); text-decoration: underline; }

@media (max-width: 1050px) { .directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .directory { padding-block: 35px 52px; }
    .directory-list { grid-template-columns: 1fr; }
    .directory-image-link { height: 235px; }
}

.filter-product-category { width: 185px; }
.filter-product-category select { width: 100%; }
.hero-search { display: flex; gap: 9px; width: min(470px, 100%); margin-top: 19px; }
.hero-search input { min-width: 0; flex: 1; min-height: 46px; padding: 0 14px; border: 1px solid #bfc7c7; border-radius: 4px; background: #fff; color: #383a3a; font: inherit; }
.hero-search button { min-height: 46px; }
.product-category-links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; }
.product-category-links a { padding: 10px 14px; border: 1px solid #d9dddd; border-radius: 4px; font-weight: 700; }
.product-category-links a:hover { border-color: #b7161f; color: #b7161f; }
.card-image-empty { display: grid; place-content: center; background: #f2f4f4; color: #707777; font-size: 15px; font-weight: 700; text-align: center; }
@media(max-width:600px) { .hero-search { flex-direction: column; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.card-image-empty { width: 100%; height: 100%; padding: 20px; }
