/**
 * RKR Programatic SEO — Front office styles.
 * All colors/radius/shadow come from CSS variables injected by
 * views/templates/hook/header_style.tpl (theme tokens configured in BO).
 * Scoped under .rkr-pseo-page / .rkr-pseo-sitemap to avoid theme collisions.
 */

/* ================================================================
   Landing page
   ================================================================ */
.rkr-pseo-page {
    --rkr-radius-px: calc(var(--rkr-radius, 10) * 1px);
    --rkr-fs: calc(var(--rkr-font-size, 15) * 1px);
    font-family: var(--rkr-font, inherit);
    font-size: var(--rkr-fs);
    color: var(--rkr-text, #212529);
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.rkr-pseo-page a { color: var(--rkr-primary, #77a632); }
.rkr-pseo-page a:hover { color: var(--rkr-secondary, #5b8023); }

/* Draft preview ribbon */
.rkr-draft-ribbon {
    background: #fdf4e5;
    border: 1px solid #f2ddb4;
    color: #96651a;
    border-radius: var(--rkr-radius-px);
    padding: 10px 16px;
    font-size: .85em;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Breadcrumb */
.rkr-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: .8em;
    color: var(--rkr-muted, #6c757d);
    margin-bottom: 18px;
}
.rkr-breadcrumb a { color: var(--rkr-muted, #6c757d); text-decoration: none; }
.rkr-breadcrumb a:hover { color: var(--rkr-primary, #77a632); text-decoration: underline; }
.rkr-breadcrumb .sep { opacity: .5; }
.rkr-breadcrumb .current { color: var(--rkr-text, #212529); font-weight: 600; }

/* Hero */
.rkr-hero {
    background: var(--rkr-surface, #fff);
    border: 1px solid var(--rkr-border, #e1e6da);
    border-radius: var(--rkr-radius-px);
    padding: 30px 32px;
    margin-bottom: 26px;
    box-shadow: var(--rkr-shadow-css, 0 2px 10px rgba(0, 0, 0, .06));
    position: relative;
    overflow: hidden;
}
.rkr-hero.grad::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--rkr-primary, #77a632) 13%, transparent),
        transparent 62%);
    pointer-events: none;
}
.rkr-hero .rkr-type-tag {
    display: inline-block;
    background: color-mix(in srgb, var(--rkr-primary, #77a632) 14%, transparent);
    color: var(--rkr-secondary, #5b8023);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: .72em;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.rkr-hero h1 {
    margin: 0 0 10px;
    font-size: 1.85em;
    line-height: 1.25;
    color: var(--rkr-text, #212529);
}
.rkr-hero .rkr-hero-sub { margin: 0; color: var(--rkr-muted, #6c757d); font-size: .95em; }
.rkr-hero.glass {
    backdrop-filter: blur(8px);
    background: color-mix(in srgb, var(--rkr-surface, #fff) 78%, transparent);
}

/* Content body (generated HTML) */
.rkr-body { line-height: 1.72; }
.rkr-body h2 { font-size: 1.4em; margin: 30px 0 12px; color: var(--rkr-text, #212529); }
.rkr-body h3 { font-size: 1.15em; margin: 24px 0 10px; color: var(--rkr-text, #212529); }
.rkr-body p { margin: 0 0 14px; }
.rkr-body ul, .rkr-body ol { padding-left: 24px; margin: 0 0 16px; }
.rkr-body li { margin-bottom: 6px; }
.rkr-body li::marker { color: var(--rkr-primary, #77a632); }

/* Product grid */
.rkr-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.rkr-product-card {
    background: var(--rkr-surface, #fff);
    border: 1px solid var(--rkr-border, #e1e6da);
    border-radius: var(--rkr-radius-px);
    overflow: hidden;
    box-shadow: var(--rkr-shadow-css, 0 2px 10px rgba(0, 0, 0, .06));
    transition: transform .22s ease, box-shadow .22s ease;
    display: flex;
    flex-direction: column;
}
.rkr-product-card:hover { transform: translateY(-4px) scale(1.012); box-shadow: 0 12px 26px rgba(0, 0, 0, .12); }
.rkr-product-card .rkr-pimg { display: block; aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--rkr-bg, #f5f7f1) 90%, var(--rkr-primary, #77a632)); position: relative; }
.rkr-product-card .rkr-pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rkr-product-card .rkr-pimg .rkr-noimg {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: color-mix(in srgb, var(--rkr-primary, #77a632) 55%, #fff);
    font-size: 2.2em; font-weight: 800;
}
.rkr-product-card .rkr-pbody { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.rkr-product-card .rkr-pname { font-size: .88em; font-weight: 700; line-height: 1.35; margin: 0; }
.rkr-product-card .rkr-pname a { color: var(--rkr-text, #212529); text-decoration: none; }
.rkr-product-card .rkr-pname a:hover { color: var(--rkr-primary, #77a632); }
.rkr-product-card .rkr-pshort { font-size: .76em; color: var(--rkr-muted, #6c757d); margin: 0; line-height: 1.5; }
.rkr-product-card .rkr-pprice { font-size: 1.02em; font-weight: 800; color: var(--rkr-primary, #77a632); margin-top: auto; }
.rkr-product-card .rkr-pbtn {
    display: block;
    text-align: center;
    background: var(--rkr-primary, #77a632);
    color: #fff !important;
    border-radius: calc(var(--rkr-radius-px) * .8);
    padding: 8px 12px;
    font-size: .8em;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}
.rkr-product-card .rkr-pbtn:hover { background: var(--rkr-secondary, #5b8023); transform: translateY(-1px); }

/* FAQ accordion */
.rkr-faq { margin: 28px 0; }
.rkr-faq h2 { font-size: 1.3em; margin-bottom: 14px; }
.rkr-faq-item {
    background: var(--rkr-surface, #fff);
    border: 1px solid var(--rkr-border, #e1e6da);
    border-radius: var(--rkr-radius-px);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--rkr-shadow-css, 0 2px 10px rgba(0, 0, 0, .06));
}
.rkr-faq-q {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: transparent;
    border: 0;
    padding: 15px 18px;
    font-size: .92em;
    font-weight: 700;
    font-family: inherit;
    color: var(--rkr-text, #212529);
    cursor: pointer;
    text-align: left;
}
.rkr-faq-q .rkr-chev { transition: transform .25s ease; color: var(--rkr-primary, #77a632); flex: 0 0 auto; }
.rkr-faq-item.open .rkr-chev { transform: rotate(180deg); }
.rkr-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    font-size: .86em;
    color: var(--rkr-muted, #6c757d);
    line-height: 1.65;
}
.rkr-faq-a > div { padding: 0 18px 15px; }

/* CTA */
.rkr-cta {
    margin: 30px 0;
    padding: 26px 28px;
    border-radius: var(--rkr-radius-px);
    background: linear-gradient(120deg, var(--rkr-primary, #77a632), var(--rkr-secondary, #5b8023));
    color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    box-shadow: var(--rkr-shadow-css, 0 6px 20px rgba(0, 0, 0, .15));
    animation: rkrCtaPulse 3.4s ease-in-out infinite;
}
.rkr-cta .rkr-cta-text { font-size: 1.05em; font-weight: 700; }
.rkr-cta .rkr-cta-sub { font-size: .82em; opacity: .88; margin-top: 3px; font-weight: 400; }
.rkr-cta .rkr-cta-btn {
    background: #fff;
    color: var(--rkr-secondary, #5b8023);
    border-radius: 999px;
    padding: 11px 24px;
    font-weight: 800;
    font-size: .9em;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.rkr-cta .rkr-cta-btn:hover { transform: scale(1.05); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); color: var(--rkr-secondary, #5b8023); }
@keyframes rkrCtaPulse {
    0%, 100% { box-shadow: var(--rkr-shadow-css, 0 6px 20px rgba(0, 0, 0, .15)); }
    50% { box-shadow: 0 6px 30px color-mix(in srgb, var(--rkr-primary, #77a632) 55%, transparent); }
}

/* Related links */
.rkr-related { margin: 30px 0 10px; }
.rkr-related h2 { font-size: 1.2em; margin-bottom: 12px; }
.rkr-related-list { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.rkr-related-list a {
    display: inline-block;
    border: 1px solid var(--rkr-border, #e1e6da);
    background: var(--rkr-surface, #fff);
    color: var(--rkr-text, #212529);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: .82em;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s ease;
}
.rkr-related-list a:hover {
    border-color: var(--rkr-primary, #77a632);
    color: var(--rkr-primary, #77a632);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* Footer link note */
.rkr-sitemap-note { margin-top: 34px; font-size: .78em; color: var(--rkr-muted, #6c757d); text-align: center; }

/* ================================================================
   HTML sitemap
   ================================================================ */
.rkr-pseo-sitemap {
    --rkr-radius-px: calc(var(--rkr-radius, 10) * 1px);
    font-family: var(--rkr-font, inherit);
    font-size: calc(var(--rkr-font-size, 15) * 1px);
    color: var(--rkr-text, #212529);
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.rkr-pseo-sitemap h1 { font-size: 1.7em; margin-bottom: 6px; }
.rkr-pseo-sitemap .rkr-sm-sub { color: var(--rkr-muted, #6c757d); font-size: .9em; margin-bottom: 22px; }
.rkr-sm-group {
    background: var(--rkr-surface, #fff);
    border: 1px solid var(--rkr-border, #e1e6da);
    border-radius: var(--rkr-radius-px);
    padding: 18px 22px;
    margin-bottom: 16px;
    box-shadow: var(--rkr-shadow-css, 0 2px 10px rgba(0, 0, 0, .06));
}
.rkr-sm-group h2 { font-size: 1.08em; margin: 0 0 12px; color: var(--rkr-secondary, #5b8023); }
.rkr-sm-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 34px; }
@media (max-width: 700px) { .rkr-sm-list { columns: 1; } }
.rkr-sm-list li { margin-bottom: 8px; break-inside: avoid; }
.rkr-sm-list a { color: var(--rkr-text, #212529); text-decoration: none; font-size: .88em; }
.rkr-sm-list a:hover { color: var(--rkr-primary, #77a632); text-decoration: underline; }
.rkr-sm-list .rkr-sm-type { font-size: .68em; color: var(--rkr-muted, #6c757d); border: 1px solid var(--rkr-border, #e1e6da); border-radius: 999px; padding: 1px 8px; margin-left: 8px; }
.rkr-sm-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; justify-content: center; }
.rkr-sm-pagination a, .rkr-sm-pagination span {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--rkr-radius-px);
    border: 1px solid var(--rkr-border, #e1e6da);
    font-size: .85em; font-weight: 700;
    color: var(--rkr-text, #212529);
    text-decoration: none;
    padding: 0 10px;
}
.rkr-sm-pagination a:hover { border-color: var(--rkr-primary, #77a632); color: var(--rkr-primary, #77a632); }
.rkr-sm-pagination .current { background: var(--rkr-primary, #77a632); border-color: var(--rkr-primary, #77a632); color: #fff; }
.rkr-sm-empty { color: var(--rkr-muted, #6c757d); font-size: .9em; }

/* ================================================================
   404 (module template)
   ================================================================ */
.rkr-pseo-404 {
    max-width: 620px;
    margin: 40px auto;
    text-align: center;
    font-family: var(--rkr-font, inherit);
    color: var(--rkr-text, #212529);
    padding: 0 16px 48px;
}
.rkr-pseo-404 .rkr-404-code {
    font-size: 5em;
    font-weight: 900;
    color: var(--rkr-primary, #77a632);
    line-height: 1;
    animation: rkr404Zoom .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.rkr-pseo-404 h1 { font-size: 1.4em; margin: 10px 0 8px; }
.rkr-pseo-404 p { color: var(--rkr-muted, #6c757d); font-size: .95em; margin-bottom: 22px; }
.rkr-pseo-404 .rkr-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rkr-pseo-404 .rkr-404-actions a {
    border-radius: 999px;
    padding: 11px 24px;
    font-weight: 700;
    font-size: .9em;
    text-decoration: none;
}
.rkr-pseo-404 .rkr-404-home { background: var(--rkr-primary, #77a632); color: #fff !important; }
.rkr-pseo-404 .rkr-404-sitemap { border: 1.5px solid var(--rkr-border, #e1e6da); color: var(--rkr-text, #212529) !important; }
.rkr-pseo-404 .rkr-404-home:hover { transform: scale(1.05); }
@keyframes rkr404Zoom { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ================================================================
   Footer hook link
   ================================================================ */
.rkr-footer-sitemap { padding: 6px 0; }
.rkr-footer-sitemap a { font-size: .95em; }

/* ================================================================
   Scroll reveal (front.js)
   ================================================================ */
.rkr-reveal { opacity: 1; }
.rkr-revealed { animation: rkr-fade-up .55s ease both; }
@keyframes rkr-fade-up { from { opacity: .35; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rkr-reveal, .rkr-revealed { opacity: 1; transform: none; animation: none; }
    .rkr-cta { animation: none; }
}

/* ================================================================
   Theme-proof spacing and small screens
   ================================================================ */
/* Some themes reset the padding of every <header>: keep the hero's own. */
.rkr-pseo-page .rkr-hero { padding: 28px 32px; }

@media (max-width: 767px) {
    .rkr-pseo-page { padding: 16px 0 32px; }
    .rkr-pseo-page .rkr-hero { padding: 18px 18px; margin-bottom: 18px; }
    .rkr-hero h1 { font-size: 1.55em; }
    /* Two products per row: a long single column hides the rest of the page. */
    .rkr-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rkr-product-card .rkr-pshort { display: none; }
    .rkr-cta { flex-direction: column; align-items: flex-start; gap: 14px; }
}
