/* =========================================================
   CYNEX Technologies: brand styles
   Brand colors: #057dcd (primary), white. Black used sparingly (text, footer).
   ========================================================= */

:root {
    --cx-primary: #057dcd;
    --cx-primary-dark: #03609c;
    --cx-primary-soft: #eaf5fc;
    --cx-primary-rgb: 5, 125, 205;
    --cx-black: #0a0a0a;
    --cx-ink: #111827;
    --cx-muted: #6b7280;
    --cx-light: #f5f9fd;
    --cx-border: #e3ecf5;
    --cx-white: #ffffff;
    --cx-radius: 14px;
    --cx-shadow: 0 10px 30px rgba(var(--cx-primary-rgb),0.12);
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--cx-ink);
    background: var(--cx-white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cx-primary);
}

a:hover {
    color: var(--cx-primary-dark);
}

:focus-visible {
    outline: 3px solid rgba(var(--cx-primary-rgb),0.45);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2000;
}

.text-cx {
    color: var(--cx-primary) !important;
}

.border-bottom {
    border-color: var(--cx-border) !important;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--cx-light);
}

.section-heading .eyebrow-dark {
    margin: 0 auto;
}

.section-heading h2 {
    position: relative;
    padding-bottom: 0.9rem;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 999px;
    background: var(--cx-primary);
}

.mt-6 {
    margin-top: 4rem;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.py-lg-6 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 992px) {
    .py-lg-6 {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

/* ---------- Buttons ---------- */
.btn-cx {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--cx-primary);
    --bs-btn-border-color: var(--cx-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--cx-primary-dark);
    --bs-btn-hover-border-color: var(--cx-primary-dark);
    --bs-btn-active-bg: var(--cx-primary-dark);
    --bs-btn-active-border-color: var(--cx-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--cx-primary-rgb);
    font-weight: 600;
    border-radius: 999px;
}

.btn-outline-cx {
    --bs-btn-color: var(--cx-primary);
    --bs-btn-border-color: var(--cx-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--cx-primary);
    --bs-btn-hover-border-color: var(--cx-primary);
    --bs-btn-focus-shadow-rgb: var(--cx-primary-rgb);
    font-weight: 600;
    border-radius: 999px;
}

.btn-dark {
    border-radius: 999px;
    font-weight: 600;
}

.btn-outline-dark,
.btn-outline-light {
    border-radius: 999px;
    font-weight: 600;
}

/* ---------- Navbar (white) ---------- */
.site-header {
    z-index: 1030;
}

.site-header .navbar {
    background: #fff;
    border-bottom: 1px solid var(--cx-border);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled .navbar {
    box-shadow: 0 6px 20px rgba(var(--cx-primary-rgb),0.12);
}

.brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    text-decoration: none;
    color: var(--cx-black);
}

.brand:hover {
    color: var(--cx-black);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-sub {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--cx-primary);
    margin-top: 0.25rem;
}

.navbar .navbar-nav .nav-link {
    color: var(--cx-ink);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--cx-primary);
    background: var(--cx-primary-soft);
}

.navbar-toggler {
    border-color: var(--cx-border);
}

.dropdown-menu {
    border: 1px solid var(--cx-border);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--cx-shadow);
}

.dropdown-menu .dropdown-item {
    border-radius: 8px;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
}

.nav-search {
    max-width: 240px;
}

.nav-search .form-control {
    background: var(--cx-light);
    border-color: var(--cx-border);
    border-radius: 999px;
}

.nav-search .form-control:focus {
    background: #fff;
    border-color: var(--cx-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--cx-primary-rgb),0.2);
}

@media (max-width: 991.98px) {
    .nav-search {
        max-width: none;
        margin-top: 1rem;
    }
}

/* ---------- Hero (white with blue accent) ---------- */
.hero {
    background:
        radial-gradient(circle at 90% 10%, rgba(var(--cx-primary-rgb),0.14), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, var(--cx-primary-soft) 100%);
}

.hero h1 {
    letter-spacing: -0.02em;
    color: var(--cx-black);
}

.hero .lead {
    max-width: 36rem;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cx-primary);
    background: rgba(var(--cx-primary-rgb),0.12);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.eyebrow-dark {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cx-primary);
}

.hero-panel {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-radius: 20px;
    box-shadow: var(--cx-shadow);
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--cx-border);
    font-weight: 500;
}

.hero-list li:last-child {
    border-bottom: 0;
}

.hero-list i {
    font-size: 1.4rem;
    color: var(--cx-primary);
}

/* ---------- Trust bar ---------- */
.trust-bar {
    background: #fff;
}

/* ---------- Category cards ---------- */
.category-card {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cx-shadow);
    border-color: var(--cx-primary);
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--cx-primary);
    color: #fff;
    font-size: 1.75rem;
}

/* ---------- Product cards ---------- */
.product-card {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cx-shadow);
    border-color: var(--cx-primary);
}

.product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 3.5rem;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.product-card .card-body {
    padding: 1rem 1.1rem 1.2rem;
}

.product-meta {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--cx-muted);
}

.badge-cx {
    background: var(--cx-primary);
    color: #fff;
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
}

/* ---------- Product detail ---------- */
.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--cx-primary-soft);
    border-radius: 20px;
    color: var(--cx-primary);
    font-size: 6rem;
    overflow: hidden;
}

.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
}

.product-assurance i {
    margin-right: 0.4rem;
}

/* ---------- Page header / breadcrumbs ---------- */
.page-hero {
    background: linear-gradient(180deg, var(--cx-primary-soft) 0%, #fff 100%);
    border-bottom: 1px solid var(--cx-border);
}

.breadcrumb-item a {
    color: var(--cx-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--cx-primary);
}

.breadcrumb-item.active {
    color: var(--cx-ink);
}

/* ---------- Filters ---------- */
.filter-panel {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
}

.filter-list .list-group-item {
    border: 0;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    color: var(--cx-ink);
}

.filter-list .list-group-item.active {
    background: var(--cx-primary);
    color: #fff;
}

.empty-state {
    background: var(--cx-light);
    border-radius: var(--cx-radius);
}

/* ---------- Services and values ---------- */
.service-card,
.value-card {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    box-shadow: var(--cx-shadow);
    transform: translateY(-3px);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 1.5rem;
}

.value-card i {
    font-size: 1.5rem;
    color: var(--cx-primary);
}

/* ---------- Checks and stats ---------- */
.check-list li {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-weight: 500;
}

.check-list i {
    color: var(--cx-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-tile {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-top: 3px solid var(--cx-primary);
    border-radius: var(--cx-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-tile i {
    font-size: 1.5rem;
    color: var(--cx-primary);
    margin-bottom: 0.5rem;
}

.stat-tile span {
    font-size: 0.8rem;
    color: var(--cx-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Forms and contact ---------- */
.form-panel,
.contact-card {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-radius: 20px;
}

.contact-card {
    background: var(--cx-primary-soft);
}

.contact-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-list i {
    font-size: 1.25rem;
    color: var(--cx-primary);
    margin-top: 0.15rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cx-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--cx-primary-rgb),0.2);
}

.form-label {
    font-size: 0.92rem;
}

/* ---------- Legal ---------- */
.legal-content {
    max-width: 52rem;
    line-height: 1.75;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* ---------- CTA band (brand blue) ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--cx-primary) 0%, var(--cx-primary-dark) 100%);
}

.cta-band .btn-cx {
    --bs-btn-color: var(--cx-primary);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: var(--cx-primary-dark);
    --bs-btn-hover-bg: var(--cx-primary-soft);
    --bs-btn-hover-border-color: var(--cx-primary-soft);
}

/* ---------- Footer (black, the only large dark area) ---------- */
.site-footer {
    font-size: 0.95rem;
    background: var(--cx-black) !important;
    border-top: 4px solid var(--cx-primary);
}

.site-footer .brand {
    color: #fff;
}

.site-footer .brand:hover {
    color: #fff;
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cx-primary);
    margin-bottom: 1rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--cx-primary);
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-contact li {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
}

.footer-contact i {
    color: var(--cx-primary);
    margin-top: 0.2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-link:hover {
    background: var(--cx-primary);
    color: #fff;
}

.about-text p {
    margin-bottom: 1rem;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
    opacity: 1;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767.98px) {
    .section {
        padding: 3.5rem 0;
    }

    .display-4 {
        font-size: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================================
   Mobile-first refinements (public site)
   Touch targets are at least 44px, content never scrolls sideways,
   and larger screens only add spacing and columns.
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.site-public {
    overflow-wrap: anywhere;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

.site-public .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-wrap: balance;
}

.site-public .btn-sm {
    min-height: 40px;
}

.site-public .btn-lg {
    min-height: 52px;
}

.site-public .btn-check:focus-visible + .btn,
.site-public .btn:focus-visible {
    outline: 3px solid rgba(var(--cx-primary-rgb), 0.45);
    outline-offset: 2px;
}

.site-public .form-control,
.site-public .form-select {
    min-height: 46px;
}

.site-public .form-control-lg,
.site-public .form-select-lg {
    min-height: 52px;
}

.page-intro {
    max-width: 40rem;
}

/* Header: compact on phones, full-width menu panel when opened */
.site-header .navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-header .navbar-brand {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.site-header .brand-name {
    font-size: 1.35rem;
}

.navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.navbar .navbar-nav .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding: 0.5rem 0 1rem;
        -webkit-overflow-scrolling: touch;
    }

    .navbar .navbar-nav {
        margin-top: 0.5rem !important;
        border-top: 1px solid var(--cx-border);
    }

    .navbar .navbar-nav .nav-item {
        border-bottom: 1px solid var(--cx-border);
    }

    .navbar .navbar-nav .nav-link {
        border-radius: 0;
        padding: 0.8rem 0.25rem;
        font-size: 1.02rem;
    }

    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .nav-link.active {
        background: transparent;
    }

    .navbar .navbar-nav .nav-link.active {
        color: var(--cx-primary);
        font-weight: 700;
    }

    .nav-search .form-control {
        min-height: 46px;
        font-size: 1rem;
    }

    .navbar .btn-cx {
        width: 100%;
        min-height: 48px;
    }
}

/* Hero and headings scale smoothly between phone and desktop */
.hero .lead {
    font-size: 1.05rem;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.section-heading h2,
.section h2 {
    font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.2;
}

.page-hero .breadcrumb {
    flex-wrap: wrap;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
    padding-right: 0.4rem;
}

.hero-panel {
    border-radius: 16px;
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section {
        padding: 2.75rem 0;
    }

    .section-alt {
        padding-top: 0.5rem;
    }

    .hero .btn-lg,
    .cta-band .btn-lg,
    .section .btn-lg {
        width: 100%;
    }

    .hero .d-flex .btn,
    .cta-band .d-flex .btn {
        width: 100%;
    }

    .eyebrow {
        font-size: 0.72rem;
    }

    .category-card .card-body {
        padding: 1.5rem !important;
    }

    .category-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .product-card .card-body {
        padding: 0.85rem 0.9rem 1rem;
    }

    .product-card h3 {
        font-size: 0.95rem;
    }

    .product-card-media {
        font-size: 2.5rem;
    }

    .product-gallery {
        font-size: 4rem;
        border-radius: 16px;
    }

    .trust-bar .text-cx {
        font-size: 1.6rem !important;
    }

    .form-panel,
    .contact-card,
    .article-cta {
        border-radius: 16px;
    }

    .form-panel,
    .contact-card {
        padding: 1.25rem !important;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }
}

/* Product filters become a horizontal row of chips on small screens */
@media (max-width: 991.98px) {
    .filter-panel {
        padding: 1rem !important;
    }

    .filter-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }

    .filter-list::-webkit-scrollbar {
        display: none;
    }

    .filter-list .list-group-item {
        flex: 0 0 auto;
        white-space: nowrap;
        border: 1px solid var(--cx-border) !important;
        border-radius: 999px;
        margin: 0;
        padding: 0.5rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        background: #fff;
    }

    .filter-list .list-group-item.active {
        border-color: var(--cx-primary) !important;
    }
}

/* Service cards and articles */
.service-card {
    overflow: hidden;
}

.service-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 3rem;
    overflow: hidden;
}

.service-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-card-media img {
    transform: scale(1.04);
}

.service-card .card-body {
    border: 0;
}

.service-card h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.article-wrap {
    max-width: 46rem;
}

.article-header h1 {
    font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem);
    line-height: 1.15;
}

.article-media img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 4rem;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2b3340;
}

.article-body p {
    margin-bottom: 1.1rem;
}

.article-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.2rem;
    margin-bottom: 0.75rem;
    color: var(--cx-black);
}

.article-list {
    padding-left: 0;
    list-style: none;
    margin-bottom: 1.25rem;
}

.article-list li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.55rem;
}

.article-list li::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.7em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--cx-primary);
}

.article-cta {
    background: var(--cx-primary-soft);
    border: 1px solid var(--cx-border);
    border-radius: 20px;
}

/* Locations */
.location-card {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.location-card:hover {
    box-shadow: var(--cx-shadow);
    border-color: var(--cx-primary);
}

.location-details li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
    overflow-wrap: anywhere;
}

.location-details i {
    color: var(--cx-primary);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Feedback type chooser (two large tap targets) */
.type-choice-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .type-choice-group {
        grid-template-columns: 1fr 1fr;
    }
}

.type-choice {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    min-height: 72px;
    padding: 0.9rem 1rem;
    border: 2px solid var(--cx-border);
    border-radius: 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.type-choice i {
    font-size: 1.6rem;
    color: var(--cx-primary);
    flex-shrink: 0;
}

.type-choice:hover {
    border-color: var(--cx-primary);
}

.btn-check:checked + .type-choice {
    border-color: var(--cx-primary);
    background: var(--cx-primary-soft);
}

.btn-check:focus-visible + .type-choice {
    outline: 3px solid rgba(var(--cx-primary-rgb), 0.45);
    outline-offset: 2px;
}

/* Footer stacks neatly on phones */
@media (max-width: 575.98px) {
    .site-footer {
        padding-top: 2.5rem !important;
        padding-bottom: 2rem !important;
    }

    .site-footer .brand-name {
        font-size: 1.5rem;
    }

    .footer-links li {
        margin-bottom: 0.75rem;
    }

    .footer-links a,
    .footer-contact a {
        display: inline-block;
        padding: 0.15rem 0;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }
}

/* Admin: service picture previews (shared stylesheet) */
.service-admin-card {
    background: #fff;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-admin-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 2.5rem;
    overflow: hidden;
}

.service-admin-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-admin-thumb {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--cx-border);
}

/* Reduce motion for people who ask for it */
@media (prefers-reduced-motion: reduce) {
    .service-card-media img {
        transition: none;
    }
}

/* ---------- Header: product hover menu and category strip ---------- */
.products-menu .dropdown-menu {
    min-width: 14rem;
}

@media (min-width: 992px) {
    /* Opens on hover (and keyboard focus) on desktop; tapping still works on touch screens */
    .products-menu:hover > .dropdown-menu,
    .products-menu:focus-within > .dropdown-menu {
        display: block;
    }

    /* Invisible bridge so the menu does not close while the pointer crosses the gap */
    .products-menu > .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -12px;
        left: 0;
        right: 0;
        height: 12px;
    }
}

.category-strip {
    background: #fff;
    border-top: 1px solid var(--cx-border);
    border-bottom: 1px solid var(--cx-border);
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.6rem 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.4rem 1rem;
    border: 1px solid var(--cx-border);
    border-radius: 999px;
    background: var(--cx-light);
    color: var(--cx-ink);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cat-pill:hover,
.cat-pill:focus-visible {
    border-color: var(--cx-primary);
    color: var(--cx-primary);
    background: var(--cx-primary-soft);
}

.cat-pill.active {
    background: var(--cx-primary);
    border-color: var(--cx-primary);
    color: #fff;
}

/* On phones the nav panel stays readable and the search sits under the menu */
@media (max-width: 991.98px) {
    .products-menu .dropdown-menu {
        position: static;
        float: none;
        border: 0;
        box-shadow: none;
        padding: 0 0 0.5rem 0.75rem;
        margin: 0;
        background: transparent;
    }

    .products-menu .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ---------- Blog ---------- */
.blog-card {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    box-shadow: var(--cx-shadow);
    border-color: var(--cx-primary);
}

.blog-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: var(--cx-primary-soft);
    color: var(--cx-primary);
    font-size: 2.5rem;
    overflow: hidden;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card .card-body {
    border: 0;
}

/* Article body from the editor */
.rich-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2b3340;
    overflow-wrap: anywhere;
}

.rich-content > *:first-child {
    margin-top: 0;
}

.rich-content p {
    margin-bottom: 1.1rem;
}

.rich-content h2,
.rich-content h3,
.rich-content h4 {
    color: var(--cx-black);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2.2rem;
    margin-bottom: 0.75rem;
}

.rich-content h2 {
    font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.75rem);
}

.rich-content h3 {
    font-size: 1.25rem;
}

.rich-content a {
    color: var(--cx-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rich-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 14px;
}

.rich-content figure {
    margin: 1.5rem 0;
}

.rich-content figcaption {
    font-size: 0.9rem;
    color: var(--cx-muted);
    text-align: center;
}

.rich-content blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid var(--cx-primary);
    background: var(--cx-primary-soft);
    border-radius: 0 12px 12px 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 1.4rem;
    margin-bottom: 1.2rem;
}

.rich-content li {
    margin-bottom: 0.4rem;
}

.rich-content pre,
.rich-content code {
    font-size: 0.92rem;
    background: var(--cx-light);
    border-radius: 8px;
}

.rich-content pre {
    padding: 1rem;
    overflow-x: auto;
}

.rich-content code {
    padding: 0.1rem 0.35rem;
}

.rich-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.rich-content th,
.rich-content td {
    border: 1px solid var(--cx-border);
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.rich-content th {
    background: var(--cx-light);
    font-weight: 600;
}

.rich-content hr {
    margin: 2.5rem 0;
    opacity: 1;
    border-color: var(--cx-border);
}

.pagination .page-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cx-primary);
    border-radius: 10px !important;
}

.pagination .page-item.active .page-link {
    background: var(--cx-primary);
    border-color: var(--cx-primary);
}

/* Admin editor: keep the toolbar usable on narrow screens */
.blog-editor-form .tox-tinymce {
    border-radius: 12px;
}

@media (max-width: 575.98px) {
    .category-pills {
        padding: 0.5rem 0;
    }

    .cat-pill {
        font-size: 0.88rem;
        padding: 0.35rem 0.85rem;
    }
}
