/* ============================================
   SOILDROPS HELP CENTER — PUBLIC STYLES
   Brand: #B1EF18 (lime), #024942 (dark teal)
   Font: Poppins (Google Fonts)
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 80px; font-size: 16px; }
@media (min-width: 768px) { html { font-size: 18px; } }
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f6f8;
    -webkit-font-smoothing: antialiased;
}

/* ===== FOCUS & ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #B1EF18;
    outline-offset: 2px;
    border-radius: 4px;
}
.product-search input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #B1EF18;
    border-radius: 4px;
}

/* ===== HERO (Landing Page) ===== */
.hero {
    background: linear-gradient(135deg, #024942 0%, #012d28 100%);
    color: white;
    padding: 4rem 2rem 3.5rem;
    text-align: center;
}
.hero-logo { max-width: 400px; margin: 0 auto 1.5rem; display: block; }
.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.hero p { font-size: 1rem; opacity: 0.85; font-weight: 300; }

/* ===== PRODUCT CARDS (Landing Page) ===== */
.products-container { max-width: 1100px; margin: -2rem auto 0; padding: 0 1.5rem 3rem; position: relative; z-index: 1; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.product-card {
    background: white; border-radius: 16px; padding: 2rem;
    text-decoration: none; color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    border: 2px solid transparent;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(2,73,66,0.12); border-color: #B1EF18; }
/* Product image on cards */
.product-image-wrap {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8faf5;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.product-image {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}
.product-emoji { font-size: 2.5rem; }
.product-name { font-size: 1.2rem; font-weight: 700; color: #024942; margin-bottom: 0.5rem; }
.product-desc { font-size: 0.9rem; color: #666; flex: 1; margin-bottom: 1rem; line-height: 1.5; }
.product-count { font-size: 0.8rem; color: #024942; font-weight: 600; background: #e8ffd6; padding: 0.3rem 0.8rem; border-radius: 20px; align-self: flex-start; }

/* ===== PRODUCT NAV (Top bar) ===== */
.product-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    overflow-x: auto;
}
.nav-back { color: #024942; text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.nav-back:hover { color: #B1EF18; }
.breadcrumb-sep { color: #ccc; font-size: 0.85rem; margin: 0 0.1rem; }
.breadcrumb-current { color: #666; font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.nav-mobile-switcher { display: none; margin-left: auto; }
.nav-mobile-switcher select {
    font-family: 'Poppins', sans-serif; font-size: 0.8rem; font-weight: 600;
    color: #024942; background: #e8ffd6; border: 1px solid #d0e8b8;
    border-radius: 6px; padding: 0.3rem 0.5rem; cursor: pointer;
}
.nav-products { display: flex; gap: 0.25rem; margin-left: auto; }
.nav-product-icon {
    width: 36px; height: 36px; flex-shrink: 0;
}
.nav-product-link {
    color: #666; text-decoration: none; font-size: 0.8rem;
    padding: 0.4rem 0.75rem; border-radius: 6px;
    white-space: nowrap; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.nav-product-link:hover { color: #024942; background: #f0f0f0; }
.nav-product-link.active { color: #024942; background: #e8ffd6; font-weight: 600; }

/* ===== PRODUCT HERO (Compact) ===== */
.product-hero {
    background: linear-gradient(135deg, #024942 0%, #012d28 100%);
    color: white;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
}
.product-hero.compact { padding: 1.75rem 2rem 1.5rem; }
.product-hero-content { max-width: 700px; margin: 0 auto 1rem; }
.product-hero h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.2rem; }
.product-hero p { font-size: 1rem; opacity: 0.8; font-weight: 300; }
.product-search {
    max-width: 480px; margin: 0 auto;
    background: white; border-radius: 8px;
    padding: 0.6rem 1.1rem;
    display: flex; align-items: center; gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.product-search input {
    flex: 1; border: none; outline: none;
    font-size: 1rem; font-family: 'Poppins', sans-serif; color: #333;
}
.product-search input::placeholder { color: #aaa; }
.product-search svg { width: 18px; height: 18px; stroke: #024942; flex-shrink: 0; }

/* ===== MOBILE SIDEBAR TOGGLE ===== */
.mobile-sidebar-toggle {
    display: none;
    position: sticky;
    top: 56px;
    z-index: 40;
    width: 100%;
    background: white;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.6rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #024942;
    cursor: pointer;
    text-align: left;
}
.mobile-sidebar-toggle:hover { background: #f8faf5; }

/* ===== PRODUCT LAYOUT (Sidebar + Content) ===== */
.product-layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 300px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    min-width: 260px;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 1.25rem 0;
    scrollbar-width: thin;
    scrollbar-color: #d0d5dd transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 4px; }

.sidebar h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaa;
    padding: 0 1.25rem;
    margin-bottom: 0.75rem;
}

.toc-section { margin-bottom: 0.5rem; }

.toc-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #024942;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 1.25rem;
    background: #f8faf5;
    border-left: 3px solid #B1EF18;
}

.toc-section ul { list-style: none; padding: 0.15rem 0; margin: 0; }
.toc-section li { margin: 0; }

.toc-link {
    display: block;
    padding: 0.3rem 1.25rem 0.3rem 1.5rem;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    line-height: 1.35;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}
.toc-link:hover { color: #024942; background: #f5f6f8; border-left-color: #d0d5dd; }
.toc-link.active { color: #024942; font-weight: 600; background: #e8ffd6; border-left-color: #B1EF18; }

/* ===== MAIN CONTENT ===== */
.product-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.5rem 3rem;
}

/* ===== CATEGORY GROUP ===== */
.category-group {
    margin-bottom: 3rem;
}
.category-group:last-child { margin-bottom: 0; }

.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #024942;
    margin: 0 0 1.25rem 0;
    padding: 0 0 0.5rem 0;
    border-bottom: 2px solid #B1EF18;
}

/* ===== ARTICLE BLOCKS (Always expanded) ===== */
.article-block {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}
.article-block:last-child { margin-bottom: 0; }

.article-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #024942;
    margin: 0 0 0.75rem 0;
    padding: 0 0 0.6rem 0;
    border-bottom: 1px solid #f0f1f3;
    line-height: 1.4;
}

.article-image {
    display: block;
    margin: 0 auto 1rem;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Click-to-zoom images */
.article-body-content img,
img.article-image {
    cursor: zoom-in;
    transition: opacity 0.15s;
}
.article-body-content img:hover,
img.article-image:hover {
    opacity: 0.85;
}

/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    padding: 2rem;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    object-fit: contain;
    animation: lightbox-in 0.2s ease-out;
}
.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 10000;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
    line-height: 1;
}
.lightbox-close:hover {
    opacity: 1;
}
@keyframes lightbox-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: #B1EF18;
    color: #024942;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    vertical-align: middle;
    margin-left: 0.5rem;
    position: relative;
    top: -1px;
}

/* ===== ARTICLE BODY CONTENT ===== */
.article-body-content p {
    margin-bottom: 0.75rem;
    line-height: 1.75;
    color: #444;
    font-size: 1rem;
}
.article-body-content p:last-child { margin-bottom: 0; }

.article-body-content ul,
.article-body-content ol {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}
.article-body-content li {
    margin-bottom: 0.3rem;
    line-height: 1.65;
    color: #444;
    font-size: 1rem;
}

.article-body-content h4 {
    color: #024942;
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
    font-weight: 700;
}
.article-body-content h5 {
    color: #024942;
    font-size: 1rem;
    margin: 1rem 0 0.4rem;
    font-weight: 600;
}
.article-body-content strong { color: #024942; font-weight: 600; }
.article-body-content img { max-width: 100%; border-radius: 8px; margin: 0.5rem 0; content-visibility: auto; }

/* Tables */
.article-body-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.article-body-content thead {
    background: #024942;
    color: #fff;
}
.article-body-content thead th {
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.article-body-content tbody tr {
    border-bottom: 1px solid #eee;
}
.article-body-content tbody tr:nth-child(even) {
    background: #f8fdf2;
}
.article-body-content tbody tr:hover {
    background: #eefadb;
}
.article-body-content td {
    padding: 0.5rem 0.8rem;
    color: #333;
    vertical-align: top;
}
.article-body-content td:first-child {
    font-weight: 600;
    color: #024942;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .article-body-content table {
        font-size: 0.78rem;
    }
    .article-body-content thead th,
    .article-body-content td {
        padding: 0.4rem 0.5rem;
    }
}

/* Steps list */
.steps-list {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
    margin-left: 0;
}
.steps-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 36px;
    margin-bottom: 0.75rem;
}
.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px; width: 24px; height: 24px;
    background: #024942;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.7rem;
}

/* Callouts */
.callout {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.75rem 0;
    border-left: 4px solid;
    font-size: 0.95rem;
    line-height: 1.6;
}
.callout.tip { background: #e8ffd6; border-left-color: #024942; }
.callout.warning { background: #fff8e1; border-left-color: #f59e0b; }
.callout.info { background: #e0f2fe; border-left-color: #0284c7; }

/* ===== SEARCH STATUS ===== */
.search-status {
    display: none;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #666;
    background: #f0f1f3;
    border-radius: 6px;
    font-weight: 500;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #999;
    font-size: 0.95rem;
    display: none;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px; height: 42px;
    background: #024942;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(2,73,66,0.25);
    transition: all 0.25s ease;
    z-index: 99;
}
.back-to-top:hover { background: #012d28; transform: translateY(-2px); }
.back-to-top.visible { display: flex; }

/* ===== FOOTER ===== */
footer {
    background: #024942;
    color: white;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    border-top: 4px solid #B1EF18;
}
footer p { margin: 0.4rem 0; opacity: 0.9; font-size: 1rem; }
footer a { color: #B1EF18; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar { width: 220px; min-width: 220px; }
    .product-content { padding: 1.5rem 1.5rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 2.5rem 1rem 2rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero-logo { max-width: 280px; }
    .products-grid { grid-template-columns: 1fr; }

    .product-nav { padding: 0 1rem; gap: 0.75rem; }
    .nav-products { display: none; }
    .nav-mobile-switcher { display: block; }
    .breadcrumb-sep, .breadcrumb-current { display: none; }

    .product-hero { padding: 1.5rem 1rem 1.25rem; }
    .product-hero.compact { padding: 1.5rem 1rem 1.25rem; }
    .product-hero h1 { font-size: 1.35rem; }

    .mobile-sidebar-toggle { display: block; }
    .product-layout { flex-direction: column; }

    .sidebar {
        display: none;
        position: fixed;
        top: 56px; left: 0;
        width: 280px;
        height: calc(100vh - 56px);
        z-index: 90;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        padding-top: 1rem;
    }
    .sidebar.mobile-open { display: block; }

    .product-content { padding: 1rem; }
    .article-block { padding: 1rem 1.1rem 1.1rem; }
    .article-block-title { font-size: 1rem; }
    .category-title { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .product-hero h1 { font-size: 1.2rem; }
    .product-content { padding: 0.75rem; }
    .article-block { padding: 0.85rem 1rem 1rem; }
}
