/* ==========================================================================
   Jysk Help Center V2 — Design Guide aligned
   ========================================================================== */

/* Page-level tweaks only when shortcode actually rendered (see wp_footer body class) */
html.jhc-has-help-center .site-main .page-header {
    display: none;
}

html.jhc-has-help-center .site-main .page-content,
html.jhc-has-help-center .site-main .entry-content,
html.jhc-has-help-center .site-main .elementor-widget-theme-post-content,
html.jhc-has-help-center .site-main .elementor-widget-shortcode {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

html.jhc-has-help-center .jhc-root {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.jhc-root [hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .jhc-root *,
    .jhc-root *::before,
    .jhc-root *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.jhc-root {
    --jhc-red: #90261d;
    --jhc-red-hover: #7a1f17;
    --jhc-yellow: #f7d500;
    --jhc-linen: #f5f0eb;
    --jhc-white: #ffffff;
    --jhc-ink: #1c1c1a;
    --jhc-mid: #6b6b6b;
    --jhc-light: #e8e3de;
    --jhc-red-tint: #f5e8e7;
    --jhc-font-heading: 'Bitter', serif;
    --jhc-font-body: 'Lato', sans-serif;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 80px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 100px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
    font-family: var(--jhc-font-body);
    color: var(--jhc-ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    isolation: isolate;
}

/* Reset theme link/heading styles inside help center */
.jhc-root a.jhc-guide-card,
.jhc-root a.jhc-guide-card:hover,
.jhc-root a.jhc-guide-card:focus,
.jhc-root a.jhc-guide-card:visited {
    color: inherit !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: var(--shadow-md);
}

.jhc-root a.jhc-guide-card:hover {
    box-shadow: var(--shadow-lg);
}

.jhc-root .jhc-card-title,
.jhc-root .jhc-card-title:hover,
.jhc-root .jhc-card-title:focus {
    color: var(--jhc-ink) !important;
    text-decoration: none !important;
}

.jhc-root .jhc-card-meta,
.jhc-root .jhc-card-meta:hover {
    color: var(--jhc-red) !important;
    text-decoration: none !important;
}

.jhc-root .jhc-hero-title,
.jhc-root .jhc-category-title {
    color: var(--jhc-ink) !important;
    text-decoration: none !important;
}

.jhc-root *,
.jhc-root *::before,
.jhc-root *::after {
    box-sizing: border-box;
}

.jhc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jhc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* Hero */
.jhc-help-hero {
    padding: var(--space-7) 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(247, 213, 0, 0.12) 0%, transparent 70%),
        var(--jhc-linen);
    border-bottom: 1px solid var(--jhc-light);
}

.jhc-hero-inner {
    text-align: center;
}

.jhc-eyebrow {
    display: inline-block;
    margin: 0 0 var(--space-2);
    padding: 4px 12px;
    background: var(--jhc-yellow);
    color: var(--jhc-ink);
    font-family: var(--jhc-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.jhc-hero-title {
    margin: 0 0 var(--space-2);
    font-family: var(--jhc-font-heading);
    font-weight: 700;
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--jhc-ink);
}

.jhc-hero-subtitle {
    margin: 0 auto var(--space-5);
    max-width: 600px;
    font-size: 18px;
    color: var(--jhc-mid);
}

/* Search combobox */
.jhc-model-search-container {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.jhc-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--jhc-mid);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    z-index: 2;
}

.jhc-root .jhc-model-search-input {
    width: 100%;
    min-height: 52px;
    padding: 14px 48px 14px 3rem !important;
    background: var(--jhc-white);
    border: 1.5px solid var(--jhc-light);
    border-radius: var(--radius-md);
    font-family: var(--jhc-font-body);
    font-size: 15px;
    color: var(--jhc-ink);
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    text-indent: 0;
}

.jhc-model-search-input::placeholder {
    color: var(--jhc-mid);
}

.jhc-model-search-input:focus {
    border-color: var(--jhc-red);
    box-shadow: 0 0 0 3px rgba(144, 38, 29, 0.1);
}

.jhc-model-search-input:focus-visible {
    outline: 3px solid var(--jhc-yellow);
    outline-offset: 3px;
}

.jhc-model-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 6px;
    border: none;
    background: transparent;
    color: var(--jhc-mid);
    cursor: pointer;
    transition: color 0.2s ease;
}

.jhc-model-search-clear:hover {
    color: var(--jhc-red);
}

.jhc-model-search-clear.visible {
    display: flex;
}

.jhc-model-search-clear:focus-visible {
    outline: 3px solid var(--jhc-yellow);
    outline-offset: 2px;
    border-radius: 4px;
}

.jhc-model-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: none;
    max-height: 240px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--jhc-white);
    border: 1px solid var(--jhc-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    z-index: 20;
}

.jhc-model-search-dropdown.visible {
    display: block;
}

.jhc-model-search-option {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 14px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.jhc-model-search-option:hover,
.jhc-model-search-option:focus,
.jhc-model-search-option[aria-selected="true"] {
    background: var(--jhc-linen);
    outline: none;
}

.jhc-model-search-option[aria-selected="true"] {
    background: var(--jhc-red-tint);
    color: var(--jhc-red);
    font-weight: 700;
}

/* Category nav pills */
.jhc-category-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--jhc-white);
    border-bottom: 1px solid var(--jhc-light);
    padding: var(--space-2) 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.jhc-category-nav .jhc-container {
    position: relative;
}

.jhc-category-nav .jhc-container::after {
    content: '';
    position: absolute;
    right: var(--space-3);
    top: 0;
    bottom: 0;
    width: 48px;
    background: linear-gradient(to left, var(--jhc-white) 20%, transparent);
    pointer-events: none;
}

.jhc-category-nav-scroll {
    display: flex;
    gap: var(--space-1);
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jhc-category-nav-scroll::-webkit-scrollbar {
    display: none;
}

/* Scoped under .jhc-root so Hello Elementor / WP theme button :focus and .active rules do not win */
.jhc-root .jhc-category-nav button.jhc-cat-pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    margin: 0;
    border: 1.5px solid var(--jhc-light);
    border-radius: var(--radius-full);
    background: var(--jhc-linen);
    color: var(--jhc-ink);
    font-family: var(--jhc-font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    text-decoration: none;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.jhc-root .jhc-category-nav button.jhc-cat-pill:hover {
    background: var(--jhc-light);
    border-color: var(--jhc-mid);
    color: var(--jhc-ink);
}

.jhc-root .jhc-category-nav button.jhc-cat-pill:focus {
    outline: none;
    background: var(--jhc-linen);
    color: var(--jhc-ink);
    border-color: var(--jhc-light);
}

.jhc-root .jhc-category-nav button.jhc-cat-pill.active,
.jhc-root .jhc-category-nav button.jhc-cat-pill.active:hover,
.jhc-root .jhc-category-nav button.jhc-cat-pill.active:focus {
    background: var(--jhc-red) !important;
    color: var(--jhc-white) !important;
    border-color: var(--jhc-red) !important;
    box-shadow: 0 2px 8px rgba(144, 38, 29, 0.25);
}

.jhc-root .jhc-category-nav button.jhc-cat-pill:focus-visible {
    outline: 3px solid var(--jhc-yellow);
    outline-offset: 2px;
}

.jhc-root .jhc-category-nav button.jhc-cat-pill.active:focus-visible {
    background: var(--jhc-red) !important;
    color: var(--jhc-white) !important;
    border-color: var(--jhc-red) !important;
}

/* Loading */
.jhc-loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-3);
    color: var(--jhc-mid);
}

.jhc-loading-state.active {
    display: flex;
}

.jhc-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--jhc-light);
    border-top-color: var(--jhc-red);
    border-radius: 50%;
    animation: jhc-spin 0.8s linear infinite;
}

@keyframes jhc-spin {
    to { transform: rotate(360deg); }
}

/* Main content */
.jhc-help-content {
    padding: var(--space-7) 0;
    min-height: 40vh;
    background: var(--jhc-white);
}

.jhc-category-section {
    margin-bottom: var(--space-7);
    scroll-margin-top: 80px;
}

.jhc-category-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--jhc-light);
}

.jhc-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--jhc-red-tint);
    color: var(--jhc-red);
    flex-shrink: 0;
}

.jhc-category-title {
    margin: 0;
    font-family: var(--jhc-font-heading);
    font-weight: 700;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.2;
}

.jhc-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
}

/* Cards */
.jhc-guide-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(28, 28, 26, 0.08);
    background: var(--jhc-white);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(28, 28, 26, 0.08);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.jhc-guide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(144, 38, 29, 0.28);
    box-shadow: 0 10px 28px rgba(28, 28, 26, 0.12);
    background: #fffdfb;
}

.jhc-guide-card:focus-visible {
    outline: 3px solid var(--jhc-yellow);
    outline-offset: 3px;
}

.jhc-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--jhc-light);
    overflow: hidden;
}

.jhc-card-image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.jhc-guide-card:hover .jhc-card-image-wrapper img {
    transform: scale(1.03);
}

.jhc-card-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    height: 0;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, var(--jhc-linen) 0%, var(--jhc-light) 100%);
}

.jhc-card-image-empty svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    color: var(--jhc-mid);
    opacity: 0.45;
}

.jhc-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    min-width: 0;
}

.jhc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.jhc-tag {
    padding: 2px 7px;
    background: var(--jhc-linen);
    color: var(--jhc-mid);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.jhc-guide-card:hover .jhc-card-title {
    color: var(--jhc-red) !important;
}

.jhc-card-title {
    margin: 0 0 10px;
    font-family: var(--jhc-font-heading);
    font-weight: 700;
    font-size: clamp(20px, 1.7vw, 22px);
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.jhc-card-excerpt {
    margin: 0 0 12px;
    flex-grow: 1;
    font-size: 16px;
    line-height: 1.65;
    color: var(--jhc-mid);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jhc-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--jhc-red);
}

.jhc-card-meta svg {
    flex-shrink: 0;
}

/* State panels (empty / error) */
.jhc-state-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 520px;
    margin: var(--space-6) auto;
    padding: var(--space-6) var(--space-3);
    background: var(--jhc-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.jhc-state-panel.active {
    display: flex;
}

.jhc-state-icon {
    margin-bottom: var(--space-3);
    color: var(--jhc-light);
}

.jhc-state-title {
    margin: 0 0 var(--space-2);
    font-family: var(--jhc-font-heading);
    font-size: 24px;
}

.jhc-state-text {
    margin: 0 0 var(--space-4);
    color: var(--jhc-mid);
    max-width: 400px;
}

.jhc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--jhc-red);
    color: var(--jhc-white);
    font-family: var(--jhc-font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(144, 38, 29, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.jhc-root .jhc-btn-primary,
.jhc-root .jhc-btn-primary:link,
.jhc-root .jhc-btn-primary:visited,
.jhc-root .jhc-btn-primary:hover,
.jhc-root .jhc-btn-primary:active {
    color: var(--jhc-white) !important;
}

.jhc-btn-primary:hover {
    background: var(--jhc-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(144, 38, 29, 0.35);
    color: var(--jhc-white);
}

.jhc-btn-primary:focus-visible {
    outline: 3px solid var(--jhc-yellow);
    outline-offset: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .jhc-guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .jhc-help-hero {
        padding: var(--space-5) 0;
    }

    .jhc-hero-subtitle {
        font-size: 16px;
        margin-bottom: var(--space-4);
    }

    .jhc-model-search-container {
        max-width: 100%;
    }

    .jhc-help-content {
        padding: var(--space-5) 0;
    }

    .jhc-category-section {
        margin-bottom: var(--space-5);
        scroll-margin-top: 60px;
    }

    .jhc-guides-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .jhc-card-content {
        padding: 18px;
    }

    .jhc-card-title {
        font-size: 20px;
    }

    .jhc-card-excerpt {
        font-size: 15px;
    }

    .jhc-container {
        padding: 0 var(--space-2);
    }
}

@media (max-width: 430px) {
    .jhc-hero-title {
        font-size: 32px;
    }

    .jhc-root .jhc-category-nav button.jhc-cat-pill {
        padding: 8px 14px;
        font-size: 13px;
    }

    .jhc-card-content {
        padding: 16px;
    }

    .jhc-tag {
        font-size: 10px;
    }
}
