/**
 * OHO Coloring Hub & Master Directory - Stylesheet v2.0.0
 * Signature Brand Theme: Teal (#0d9488 / #14b8a6)
 */

:root {
    --oho-teal: #0d9488;
    --oho-teal-dark: #0f766e;
    --oho-teal-light: #ccfbf1;
    --oho-teal-glow: rgba(13, 148, 136, 0.18);
    --oho-ink: #0f172a;
    --oho-muted: #64748b;
    --oho-border: #e2e8f0;
    --oho-bg-alt: #f8fafc;
    --oho-radius: 16px;
    --oho-sticky-top: 85px;
}

/* Master Container */
.oho-directory-container {
    width: 100%;
    margin: 20px 0 60px 0;
    font-family: inherit;
    box-sizing: border-box;
    color: var(--oho-ink);
}
.oho-directory-container *,
.oho-directory-container *::before,
.oho-directory-container *::after {
    box-sizing: border-box;
}

/* Live Instant Search Bar */
.oho-dir-search-box {
    position: relative;
    max-width: 680px;
    margin: 0 auto 35px auto;
}
.oho-dir-search-input {
    width: 100%;
    padding: 16px 22px 16px 48px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid var(--oho-border);
    border-radius: 50px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    outline: none;
    transition: all 0.25s ease;
    color: var(--oho-ink);
}
.oho-dir-search-input:focus {
    border-color: var(--oho-teal);
    box-shadow: 0 6px 24px var(--oho-teal-glow);
}
.oho-dir-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--oho-muted);
    pointer-events: none;
}

/* Trending In-Season Banner */
.oho-dir-spotlight {
    display: grid;
    grid-template-columns: minmax(200px, 34%) 1fr;
    background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
    border: 2px solid #99f6e4;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 8px 24px -4px var(--oho-teal-glow);
    text-decoration: none !important;
    transition: all 0.3s ease;
}
.oho-dir-spotlight:hover {
    transform: translateY(-3px);
    border-color: var(--oho-teal);
    box-shadow: 0 16px 32px -6px rgba(13, 148, 136, 0.25);
}
.oho-dir-spotlight-img {
    position: relative;
    min-height: 200px;
    background: var(--oho-teal);
    overflow: hidden;
}
.oho-dir-spotlight-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.oho-dir-spotlight:hover .oho-dir-spotlight-img img {
    transform: scale(1.06);
}
.oho-dir-spotlight-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.oho-dir-spotlight-badge {
    display: inline-block;
    background: var(--oho-teal-light);
    color: var(--oho-teal-dark);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.oho-dir-spotlight-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--oho-ink);
    margin: 0 0 6px 0;
    line-height: 1.25;
}
.oho-dir-spotlight-desc {
    font-size: 14.5px;
    color: var(--oho-muted);
    margin: 0 0 16px 0;
    line-height: 1.45;
}
.oho-dir-spotlight-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--oho-teal);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 50px;
    transition: background 0.2s ease;
}
.oho-dir-spotlight:hover .oho-dir-spotlight-btn {
    background: var(--oho-teal-dark);
}

/* Master Layout: Sidebar TOC + Main Directory Content */
.oho-dir-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

/* Sticky Sidebar Table of Contents (TOC) */
.oho-dir-toc {
    position: sticky;
    top: var(--oho-sticky-top);
    background: #ffffff;
    border: 1.5px solid var(--oho-border);
    border-radius: var(--oho-radius);
    padding: 16px 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
    max-height: calc(100vh - var(--oho-sticky-top) - 25px);
    overflow-y: auto;
    scrollbar-width: thin;
}
body.admin-bar .oho-dir-toc {
    top: calc(var(--oho-sticky-top) + 32px);
}
.oho-dir-toc-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--oho-muted);
    padding: 4px 10px 10px 10px;
    margin: 0 0 4px 0;
    border-bottom: 1px solid var(--oho-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.oho-dir-toc-list {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.oho-dir-toc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.oho-dir-toc-link span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.oho-dir-toc-count {
    background: #f1f5f9;
    color: var(--oho-muted);
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.oho-dir-toc-link:hover {
    background: var(--oho-teal-light);
    color: var(--oho-teal-dark) !important;
    transform: translateX(3px);
}
.oho-dir-toc-link.is-active {
    background: var(--oho-teal);
    color: #ffffff !important;
    font-weight: 700;
}
.oho-dir-toc-link.is-active .oho-dir-toc-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Category Sections */
.oho-dir-section {
    margin-bottom: 52px;
    scroll-margin-top: calc(var(--oho-sticky-top) + 20px);
}
.oho-dir-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.oho-dir-section-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--oho-ink);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
}
.oho-dir-section-tagline {
    font-size: 14px;
    color: var(--oho-muted);
    margin: 0;
}
.oho-dir-view-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--oho-teal) !important;
    text-decoration: none !important;
    padding: 6px 14px;
    background: var(--oho-teal-light);
    border-radius: 20px;
    transition: all 0.2s ease;
}
.oho-dir-view-all:hover {
    background: var(--oho-teal);
    color: #ffffff !important;
}

/* Topic Cards Grid */
.oho-dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.oho-dir-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1.5px solid var(--oho-border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--oho-ink) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.oho-dir-card:hover {
    transform: translateY(-5px);
    border-color: var(--oho-teal);
    box-shadow: 0 12px 24px -4px var(--oho-teal-glow);
}
.oho-dir-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 65%; /* 3:2 landscape aspect ratio */
    background: #f1f5f9;
    overflow: hidden;
}
.oho-dir-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.oho-dir-card:hover .oho-dir-thumb {
    transform: scale(1.06);
}
.oho-dir-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}
.oho-dir-body {
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    background: #ffffff;
}
.oho-dir-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oho-ink);
    margin: 0 0 5px 0;
    line-height: 1.35;
    transition: color 0.2s ease;
}
.oho-dir-card:hover .oho-dir-card-title {
    color: var(--oho-teal);
}
.oho-dir-action {
    font-size: 12px;
    font-weight: 700;
    color: var(--oho-teal);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

/* Fallback for single-category shortcode [oho_hub] */
.oho-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0 35px;
    width: 100%;
}
.oho-hub-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1.5px solid var(--oho-border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--oho-ink) !important;
    transition: all 0.25s ease;
}
.oho-hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--oho-teal);
    box-shadow: 0 12px 24px -4px var(--oho-teal-glow);
}
.oho-hub-img {
    position: relative;
    width: 100%;
    padding-top: 65%;
    background: #f1f5f9;
    overflow: hidden;
    display: block;
}
.oho-hub-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.oho-hub-card:hover .oho-hub-img img {
    transform: scale(1.05);
}
.oho-hub-body {
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.oho-hub-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oho-ink);
    margin: 0 0 5px 0;
    line-height: 1.35;
}
.oho-hub-card:hover .oho-hub-title {
    color: var(--oho-teal);
}
.oho-hub-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--oho-teal);
}

/* Mobile & Tablet Responsive Media Queries */
@media (max-width: 850px) {
    .oho-dir-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* On mobile/tablet, sidebar turns into sticky horizontal sliding pills bar */
    .oho-dir-toc {
        position: sticky;
        top: 0;
        z-index: 100;
        margin: -10px -15px 24px -15px;
        padding: 10px 14px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        background: #ffffff;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
    body.admin-bar .oho-dir-toc {
        top: 46px;
    }
    .oho-dir-toc-title {
        display: none;
    }
    .oho-dir-toc-list {
        flex-direction: row;
        gap: 8px;
        margin: 0;
    }
    .oho-dir-toc-link {
        flex-shrink: 0;
        padding: 7px 14px;
        border-radius: 50px;
        background: #f1f5f9;
        font-size: 13.5px;
    }
    .oho-dir-toc-link.is-active {
        background: var(--oho-teal);
    }
    .oho-dir-section {
        scroll-margin-top: 80px;
    }
    .oho-dir-spotlight {
        grid-template-columns: 1fr;
    }
    .oho-dir-spotlight-img {
        min-height: 170px;
    }
    .oho-dir-spotlight-body {
        padding: 20px 22px;
    }
    .oho-dir-grid,
    .oho-hub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
@media (max-width: 480px) {
    .oho-dir-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .oho-dir-view-all {
        align-self: flex-start;
    }
}
