/* ═══════════════════════════════════════════════════════════
   3DSEARCH – Hub Pages CSS (Mobile-First)
   ═══════════════════════════════════════════════════════════ */

.hub-page {
    padding: 20px 0 40px;
    min-height: 60vh;
}

.hub-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Breadcrumb */
.hub-page .breadcrumb {
    font-size: 13px;
    color: var(--text-muted, #6a737d);
    margin-bottom: 16px;
    word-break: break-word;
    line-height: 1.6;
}
.hub-page .breadcrumb a {
    color: var(--accent, #ff6b35);
    text-decoration: none;
}
.hub-page .breadcrumb a:hover { text-decoration: underline; }

/* H1 */
.hub-page h1 {
    font-size: 1.7em;
    line-height: 1.25;
    margin: 0 0 20px;
    color: var(--text, #1a1a1a);
    font-weight: 700;
}

/* Cover Image */
.hub-page .hub-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
    display: block;
}

/* Intro / Body Content */
.hub-page .hub-intro,
.hub-page .hub-body {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    line-height: 1.65;
    color: var(--text, #333);
    font-size: 16px;
}
.hub-page .hub-intro p,
.hub-page .hub-body p {
    margin: 0 0 14px;
}
.hub-page .hub-intro p:last-child,
.hub-page .hub-body p:last-child { margin-bottom: 0; }

.hub-page .hub-intro h2,
.hub-page .hub-body h2 {
    font-size: 1.3em;
    margin: 24px 0 12px;
    color: var(--text, #1a1a1a);
}
.hub-page .hub-intro h2:first-child,
.hub-page .hub-body h2:first-child { margin-top: 0; }

.hub-page .hub-intro ul,
.hub-page .hub-body ul,
.hub-page .hub-intro ol,
.hub-page .hub-body ol {
    margin: 0 0 14px;
    padding-left: 24px;
}
.hub-page .hub-intro li,
.hub-page .hub-body li { margin-bottom: 6px; }

.hub-page .hub-intro strong,
.hub-page .hub-body strong { font-weight: 600; color: var(--text, #1a1a1a); }

/* Section H2 */
.hub-page > .container > h2 {
    font-size: 1.4em;
    margin: 32px 0 16px;
    color: var(--text, #1a1a1a);
}

/* ═══ MODELS GRID — Mobile-First ═══ */
.hub-models-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 32px;
}

.hub-model-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    min-height: 130px;
}

.hub-model-card:active { transform: scale(0.98); }
.hub-model-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.hub-model-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    z-index: 2;
}

.hub-model-card img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.hub-model-body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hub-model-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
    color: var(--text, #1a1a1a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted, #6a737d);
    margin-bottom: 6px;
    align-items: center;
}

.hub-model-meta span { white-space: nowrap; }

.src-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f4f8;
    color: #555;
    text-transform: capitalize;
}
.src-tag.src-cults3d      { background: #ffe5d9; color: #c4410f; }
.src-tag.src-printables   { background: #fdebd0; color: #b35200; }
.src-tag.src-thingiverse  { background: #d6f0ff; color: #0066a3; }
.src-tag.src-makerworld   { background: #d4f4dd; color: #1b8638; }
.src-tag.src-myminifactory{ background: #ffe5e5; color: #b80000; }
.src-tag.src-grabcad      { background: #dde5f5; color: #2c3e75; }
.src-tag.src-crealitycloud{ background: #f0e0ff; color: #6f1cb5; }
.src-tag.src-makeronline  { background: #fff4cc; color: #8a6d00; }
.src-tag.src-sketchfab    { background: #e0f0ff; color: #1a4d80; }

.hub-model-summary {
    font-size: 13px;
    color: var(--text-muted, #6a737d);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══ FAQ ═══ */
.hub-faq {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.hub-faq h2 {
    margin: 0 0 16px;
    font-size: 1.3em;
}
.hub-faq details {
    border-bottom: 1px solid var(--border, #e1e4e8);
    padding: 12px 0;
}
.hub-faq details:last-child { border-bottom: none; }
.hub-faq summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    padding-right: 24px;
    position: relative;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text, #1a1a1a);
}
.hub-faq summary::-webkit-details-marker { display: none; }
.hub-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 22px;
    font-weight: 300;
    color: var(--accent, #ff6b35);
    line-height: 1;
    transition: transform 0.2s ease;
}
.hub-faq details[open] summary::after { content: '−'; }
.hub-faq p {
    margin: 12px 0 0;
    color: var(--text-muted, #555);
    line-height: 1.6;
    font-size: 15px;
}

/* ═══ CTA Section ═══ */
.hub-cta {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4d00 100%);
    color: white;
    padding: 32px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
}
.hub-cta h2 {
    color: white;
    margin: 0 0 8px;
    font-size: 1.4em;
}
.hub-cta p {
    margin: 0 0 20px;
    opacity: 0.95;
    font-size: 15px;
    line-height: 1.5;
}
.hub-cta .btn-primary {
    display: inline-block;
    background: var(--bg-card);
    color: #ff4d00;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.15s ease;
}
.hub-cta .btn-primary:active { transform: scale(0.97); }

/* ═══ Hub Overview Page (/hub) ═══ */
.hub-overview {
    padding: 20px 0 40px;
    min-height: 60vh;
}
.hub-overview h1 {
    font-size: 1.8em;
    margin: 0 0 8px;
}
.hub-overview .hub-intro {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 24px;
    font-size: 16px;
    color: var(--text-muted, #555);
}
.hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.hub-overview .hub-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}
.hub-overview .hub-card:active { transform: scale(0.98); }
.hub-overview .hub-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.hub-overview .hub-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.hub-overview .hub-card-body {
    padding: 16px;
}
.hub-overview .hub-card-body h2 {
    font-size: 1.05em;
    margin: 0 0 6px;
    color: var(--text, #1a1a1a);
}
.hub-overview .hub-card-body p {
    margin: 0;
    color: var(--text-muted, #6a737d);
    font-size: 14px;
    line-height: 1.5;
}

/* ═══ TABLET (640px+) ═══ */
@media (min-width: 640px) {
    .hub-page .container { padding: 0 24px; }
    .hub-page h1 { font-size: 2em; }
    .hub-models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .hub-model-card { flex-direction: column; min-height: auto; }
    .hub-model-card img { width: 100%; height: 200px; }
    .hub-model-body { padding: 14px 16px 16px; }
    .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ DESKTOP (960px+) ═══ */
@media (min-width: 960px) {
    .hub-page h1 { font-size: 2.3em; }
    .hub-models-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .hub-model-card img { height: 220px; }
    .hub-grid { grid-template-columns: repeat(3, 1fr); }
    .hub-cta { padding: 48px 32px; }
    .hub-cta h2 { font-size: 1.8em; }
}

/* ═══ LARGE DESKTOP (1200px+) ═══ */
@media (min-width: 1200px) {
    .hub-models-grid { grid-template-columns: repeat(4, 1fr); }
    .hub-grid { grid-template-columns: repeat(3, 1fr); }
}
