/*
 * UniAdvisor -- Página de HUB (rede/mantenedora) dentro do CPT universidade.
 *
 * Estrutura/classes e valores (cor, radius, shadow, gap, padding, tamanho de
 * fonte) transplantados literalmente do mockup "pagina_instituicao.html"
 * fornecido pelo usuário -- especificação final, não inspiração. Tudo
 * escopado sob .hub-page (mesma mitigação de colisão de nomes genéricos já
 * usada em .uni-page/universidade.css) porque essa folha só carrega nas
 * páginas de post HUB (ver uniadvisor_enqueue_styles() em functions.php);
 * campus continua 100% em universidade.css/.uni-page, sem nenhuma mudança.
 *
 * Ícones: o mockup usa emoji diretamente no HTML, mas o arquivo chegou com
 * a codificação dos emojis corrompida (mojibake) -- os bytes originais não
 * são recuperáveis com segurança. Em vez de adivinhar o emoji certo,
 * reaproveitamos os ícones SVG que já existem no projeto (mesmo papel
 * visual: ícone dentro de um quadrado/círculo colorido). Só os ÍCONES
 * mudaram de emoji pra SVG; cores/tamanhos/raios das caixas que os
 * envolvem seguem os valores exatos do mockup.
 */

.hub-page{
    --blue:#2f6fed;
    --blue-dark:#1e4fc4;
    --ink:#14171f;
    --ink-soft:#5b6472;
    --line:#e7eaf0;
    --bg-soft:#f6f8fb;
    --green:#1c9a5b;
    --green-bg:#eaf7f0;
    --red:#e0483e;
    --red-bg:#fdeeec;
    --amber:#f5a623;
    --radius:14px;
    --shadow:0 10px 30px -14px rgba(20,30,60,.14);
    color:var(--ink);
    background:#fff;
    line-height:1.5;
}
.hub-page a{color:inherit;text-decoration:none;}
.hub-page img{max-width:100%;display:block;}
.hub-page ul{margin:0;padding:0;list-style:none;}
.hub-page button{font-family:inherit;cursor:pointer;}
.hub-page .wrap{max-width:1180px;margin:0 auto;padding:0 32px;}

/* ---------- Breadcrumb ---------- */
.hub-page .breadcrumb{font-size:13.5px;color:var(--ink-soft);padding:14px 0;}
.hub-page .breadcrumb .sep{margin:0 8px;opacity:.5;}
.hub-page .breadcrumb .current{color:var(--ink);}

/* ---------- Hero ---------- */
.hub-page .hero{position:relative;border-radius:0;overflow:hidden;background:#0c1c3d;min-height:300px;}
.hub-page .hero-bg{position:absolute;inset:0;background-size:cover;background-position:center;}
.hub-page .hero-overlay{position:absolute;inset:0;background:linear-gradient(100deg, rgba(10,22,55,.94) 0%, rgba(10,22,55,.75) 38%, rgba(10,30,70,.35) 68%, rgba(10,30,70,.15) 100%);}
.hub-page .hero-content{position:relative;z-index:2;max-width:1180px;margin:0 auto;padding:34px 32px 26px;}
.hub-page .hero-top{display:flex;gap:20px;align-items:flex-start;}
.hub-page .hero-logo{width:96px;height:96px;border-radius:16px;background:#fff;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:10px;box-shadow:var(--shadow);}
.hub-page .hero-info{color:#fff;}
.hub-page .verified{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.3);color:#dbe6ff;font-size:12px;font-weight:700;padding:4px 10px;border-radius:20px;margin-bottom:10px;}
.hub-page .verified svg{width:13px;height:13px;}
.hub-page h1.inst-title{font-size:32px;font-weight:800;margin:0 0 4px;color:#fff;}
.hub-page .inst-sub{font-size:14.5px;color:#c7d3ec;margin-bottom:10px;font-weight:600;}
.hub-page .rating-row{display:flex;align-items:center;gap:10px;font-size:14.5px;color:#e7ecf9;flex-wrap:wrap;}
.hub-page .stars{color:var(--amber);letter-spacing:1px;font-size:15px;}
.hub-page .rating-num{font-weight:800;color:#fff;}
.hub-page .recommend{display:inline-flex;align-items:center;gap:6px;color:#a9f0c8;font-weight:700;}

.hub-page .hero-facts{display:flex;gap:34px;margin-top:22px;flex-wrap:wrap;color:#fff;}
.hub-page .hf-item{display:flex;align-items:center;gap:10px;}
.hub-page .hf-icon{width:34px;height:34px;border-radius:9px;background:rgba(255,255,255,.14);display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;}
.hub-page .hf-icon svg{width:16px;height:16px;color:#fff;}
.hub-page .hf-label{font-size:11.5px;color:#b9c6e6;}
.hub-page .hf-value{font-size:13.5px;font-weight:700;color:#fff;}

.hub-page .hero-cta{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap;}
.hub-page .btn{border:none;border-radius:10px;padding:12px 20px;font-weight:700;font-size:14px;display:inline-flex;align-items:center;gap:8px;transition:transform .15s ease;}
.hub-page .btn svg{width:15px;height:15px;}
.hub-page .btn:hover{transform:translateY(-1px);}
.hub-page .btn-primary{background:var(--blue);color:#fff;}
.hub-page .btn-primary:hover{background:var(--blue-dark);}
.hub-page .btn-outline{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.4);}
.hub-page .btn-outline.light{background:#fff;color:var(--ink);border:1px solid var(--line);}

/* ---------- Tabs ---------- */
.hub-page .tabs{border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:40;}
body.admin-bar .hub-page .tabs{top:32px;}
@media screen and (max-width:600px){body.admin-bar .hub-page .tabs{top:46px;}}
.hub-page .tabs-inner{max-width:1180px;margin:0 auto;padding:0 32px;display:flex;gap:28px;overflow-x:auto;}
.hub-page .tab{padding:16px 2px;font-size:14.5px;font-weight:600;color:var(--ink-soft);white-space:nowrap;border-bottom:2px solid transparent;cursor:pointer;display:inline-block;}
.hub-page .tab.active{color:var(--blue);border-color:var(--blue);}

/* ---------- Main / cards ---------- */
main.hub-page{background:var(--bg-soft);padding:36px 0 0;}
.hub-page .card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:26px;}
.hub-page section.block{padding-bottom:24px;}
.hub-page .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media(max-width:600px){.hub-page .grid-2{grid-template-columns:1fr;}}
.hub-page h2.sec-title{font-size:19px;font-weight:800;margin:0 0 12px;}
.hub-page .link-more{color:var(--blue);font-weight:700;font-size:13.5px;display:inline-flex;align-items:center;gap:6px;}

/* ---------- Sobre + MEC stats ---------- */
.hub-page .about-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;gap:14px;align-items:stretch;}
.hub-page .about-card p{color:var(--ink-soft);font-size:14px;margin:0 0 14px;}
.hub-page .about-card .clamped{color:var(--ink-soft);font-size:14px;margin:0 0 14px;}
.hub-page .about-card .clamped p{margin:0 0 8px;}
.hub-page .about-card .clamped.aplicar-clamp{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;}
.hub-page .about-card .clamped.aplicar-clamp.expandido{display:block;-webkit-line-clamp:unset;overflow:visible;}
.hub-page .stat-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;}
.hub-page .stat-icon{width:42px;height:42px;border-radius:11px;background:#e7effe;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:18px;}
.hub-page .stat-icon svg{width:19px;height:19px;}
.hub-page .stat-label{font-size:12px;color:var(--ink-soft);}
.hub-page .stat-value{font-size:19px;font-weight:800;}
.hub-page .stat-sub{font-size:11px;color:var(--ink-soft);}

/* ---------- Avaliações ---------- */
.hub-page .reviews-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:14px;}
.hub-page .review-summary{grid-column:span 1;text-align:left;}
.hub-page .review-summary .rs-label{font-size:12.5px;color:var(--ink-soft);margin-bottom:10px;}
.hub-page .rs-num{font-size:38px;font-weight:800;line-height:1;}
.hub-page .rs-stars{color:var(--amber);font-size:16px;margin:8px 0;}
.hub-page .rs-recommend{font-size:13px;font-weight:700;color:var(--green);margin-bottom:16px;}
.hub-page .bars-card{display:flex;flex-direction:column;gap:14px;justify-content:center;}
.hub-page .bar-row{font-size:13px;}
.hub-page .bar-row .bl{display:flex;justify-content:space-between;margin-bottom:5px;color:var(--ink-soft);}
.hub-page .bar-row .bl b{color:var(--ink);font-weight:700;}
.hub-page .bar-track{height:6px;border-radius:4px;background:var(--bg-soft);overflow:hidden;}
.hub-page .bar-fill{height:100%;border-radius:4px;background:var(--green);}
.hub-page .fit-card{border-radius:var(--radius);padding:20px;}
.hub-page .fit-good{background:var(--green-bg);}
.hub-page .fit-bad{background:var(--red-bg);}
.hub-page .fit-head{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:700;font-size:14px;}
.hub-page .fit-head svg{width:16px;height:16px;}
.hub-page .fit-good .fit-head{color:#116b3d;}
.hub-page .fit-bad .fit-head{color:#9c2a22;}
.hub-page .fit-card li{display:flex;gap:8px;font-size:13px;margin-bottom:9px;}
.hub-page .fit-card li svg{width:14px;height:14px;flex-shrink:0;margin-top:1px;}
.hub-page .fit-good li{color:#1e5c3a;}
.hub-page .fit-bad li{color:#7c2b23;}

/* ---------- Cursos ---------- */
.hub-page .courses-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin-top:16px;}
.hub-page .course-item{
    display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;
    background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);
    padding:18px 12px;
}
.hub-page .course-icon{width:36px;height:36px;border-radius:9px;background:#e7effe;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:16px;}
.hub-page .course-icon svg{width:17px;height:17px;}
.hub-page .course-area{font-size:12.5px;color:var(--ink-soft);}
.hub-page .course-count{font-size:15px;font-weight:800;border-top:2px solid var(--line);padding-top:8px;width:100%;}

/* Lista completa de cursos (não está no mockup -- funcionalidade real já
   existente, "Ver todos os cursos" revela isso por baixo do courses-grid;
   usa os mesmos tokens de cor desta folha pra ficar coerente). */
.hub-page .course-list-wrap{margin-top:16px;}
.hub-page .course-search{width:100%;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;margin-bottom:10px;}
.hub-page .course-list{display:flex;flex-direction:column;gap:2px;max-height:340px;overflow-y:auto;}
.hub-page .course-list li{border-bottom:1px solid var(--line);}
.hub-page .course-list li:last-child{border-bottom:none;}
.hub-page .course-list a{padding:10px 2px;font-size:13.5px;}
.hub-page .course-list .left{display:flex;align-items:center;gap:10px;}
.hub-page .course-list .grad{width:16px;height:16px;color:var(--blue);flex-shrink:0;}
.hub-page .course-list .chev{width:14px;height:14px;color:var(--ink-soft);flex-shrink:0;}

/* ---------- Encontre uma unidade ---------- */
.hub-page .find-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;align-items:start;}
.hub-page .filters{display:grid;grid-template-columns:repeat(4,1fr) auto;gap:10px;margin:16px 0 20px;align-items:end;}
.hub-page .field label{display:block;font-size:12px;color:var(--ink-soft);margin-bottom:6px;}
.hub-page .field select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;color:var(--ink);background:#fff;}
.hub-page .find-count-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;font-size:14px;font-weight:700;flex-wrap:wrap;gap:8px;}
.hub-page .find-count-row select{border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:13px;color:var(--ink-soft);}
.hub-page .unit-card{display:flex;gap:14px;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px;align-items:center;flex-wrap:wrap;}
.hub-page .unit-photo{width:96px;height:72px;border-radius:8px;object-fit:cover;flex-shrink:0;background:var(--bg-soft);}
.hub-page .unit-info{flex:1;min-width:0;}
.hub-page .unit-name{font-weight:700;font-size:14.5px;margin-bottom:4px;}
.hub-page .unit-rating{display:flex;align-items:center;gap:6px;font-size:12.5px;margin-bottom:4px;}
.hub-page .unit-rating .stars{font-size:12.5px;}
.hub-page .unit-addr{font-size:12.5px;color:var(--ink-soft);margin-bottom:4px;display:flex;align-items:center;gap:5px;}
.hub-page .unit-addr svg{width:12px;height:12px;flex-shrink:0;}
.hub-page .unit-meta{font-size:12px;color:var(--ink-soft);display:flex;gap:10px;flex-wrap:wrap;}
.hub-page .unit-meta span{display:inline-flex;align-items:center;gap:4px;}
.hub-page .unit-meta svg{width:12px;height:12px;}
.hub-page .unit-dist{font-size:12px;color:var(--ink-soft);white-space:nowrap;margin-right:6px;}
.hub-page .btn-sm{padding:8px 14px;font-size:13px;white-space:nowrap;}

/* ---------- Faculdades relacionadas ---------- */
.hub-page .related-item{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);}
.hub-page .related-item:last-child{border-bottom:none;}
.hub-page .rel-logo{width:40px;height:40px;border-radius:9px;background:var(--bg-soft);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:var(--ink-soft);flex-shrink:0;overflow:hidden;}
.hub-page .rel-logo img{width:100%;height:100%;object-fit:contain;}
.hub-page .rel-info{flex:1;min-width:0;}
.hub-page .rel-name{font-weight:700;font-size:13.5px;}
.hub-page .rel-sub{font-size:11.5px;color:var(--ink-soft);margin:2px 0;}
.hub-page .rel-rating{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:700;}
.hub-page .rel-rating svg{width:12px;height:12px;color:var(--amber);}

/* ---------- Newsletter ---------- */
.hub-page .newsletter{background:#e7effe;border-radius:var(--radius);padding:20px 26px;display:flex;align-items:center;gap:16px;margin:28px 0;flex-wrap:wrap;}
.hub-page .nl-icon{width:44px;height:44px;border-radius:10px;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.hub-page .nl-icon svg{width:19px;height:19px;}
.hub-page .nl-text{flex:1;font-weight:700;font-size:14.5px;}
.hub-page .nl-input{flex:1;max-width:280px;padding:11px 14px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;}

/* ---------- FAQ (não estava no mockup -- reaproveita os mesmos tokens de cor/raio desta folha pra ficar coerente com o resto da página) ---------- */
.hub-page .faq-grid{display:flex;flex-direction:column;gap:10px;}
.hub-page .faq-item{border:1px solid var(--line);border-radius:10px;overflow:hidden;}
.hub-page .faq-q{width:100%;text-align:left;background:#fff;border:none;padding:16px 18px;font-weight:700;font-size:14.5px;color:var(--ink);display:flex;align-items:center;justify-content:space-between;gap:12px;}
.hub-page .faq-q svg{width:16px;height:16px;flex-shrink:0;transition:transform .15s ease;color:var(--ink-soft);}
.hub-page .faq-item.open .faq-q svg{transform:rotate(180deg);}
.hub-page .faq-a{max-height:0;overflow:hidden;transition:max-height .2s ease;}
.hub-page .faq-item.open .faq-a{max-height:400px;}
.hub-page .faq-a p{margin:0;padding:0 18px 16px;color:var(--ink-soft);font-size:13.5px;line-height:1.6;}

@media(max-width:980px){
    .hub-page .about-grid{grid-template-columns:1fr 1fr;}
    .hub-page .reviews-grid{grid-template-columns:1fr 1fr;}
    .hub-page .courses-grid{grid-template-columns:repeat(3,1fr);}
    .hub-page .find-grid{grid-template-columns:1fr;}
    .hub-page .filters{grid-template-columns:1fr 1fr;}
}

@media(max-width:600px){
    .hub-page .hero-content{padding:24px 20px 20px;}
    .hub-page h1.inst-title{font-size:24px;}
    .hub-page .hero-top{flex-direction:column;align-items:flex-start;}
    .hub-page .wrap{padding:0 18px;}
    .hub-page .about-grid,
    .hub-page .reviews-grid,
    .hub-page .courses-grid{grid-template-columns:1fr;}
    .hub-page .filters{grid-template-columns:1fr;}
}
