/* Minegolia global below-hero compaction (~75% visual density at 100% browser zoom).
   HERO IS FROZEN: this file intentionally never targets .mg-home-hero*, .mg-module-hero*,
   .mg-mineral-hero*, .mg-page-hero, .mg-home-search, .mg-popular, .mg-home-market,
   .mg-filter-chips, .mg-hero-panel-list, .mg-mineral-actions, .mg-mineral-market,
   .mg-mineral-chart, .mg-editorial-market (hero-adjacent news market panel),
   header/nav/logo/footer selectors. Only real CSS sizing — no zoom/transform/scale hacks.
   This is the LAST-LOADED stylesheet (enqueued after compact-scale.css,
   global-compact-unification.css, homepage-full-compaction.css) so every rule below wins
   the cascade for shared below-hero components across ALL templates: front-page.php,
   page-exploration.php, page-services.php, page-news.php, page-reference-module.php
   (map/tenders/marketplace/login/register), page-mineral-detail.php, page-platform.php. */

:root{
  --mg-below-section-pad:20px;
  --mg-below-home-section-pad:26px;
  --mg-below-grid-gap:6px;
  --mg-below-card-pad:8px;
  --mg-below-panel-pad:9px;
  --mg-below-control-h:34px;
  --mg-below-title:clamp(16px,1.15vw,20px);
  --mg-below-card-title:11.5px;
  --mg-below-icon-sm:12px;
  --mg-below-icon-md:16px;
  --mg-below-icon-lg:32px;
}

/* ===== Section rhythm (below-hero only) ===== */
body .mg-section{padding-top:var(--mg-below-section-pad)!important;}
body.home .mg-home-section,body.front-page .mg-home-section{padding-top:var(--mg-below-home-section-pad)!important;}
.mg-section-head{margin-bottom:7px!important;gap:8px!important;}
body.home .mg-home-section-title,body.front-page .mg-home-section-title{margin-bottom:9px!important;gap:10px!important;}
.mg-section-head h2,.mg-section h2{font-size:var(--mg-below-title)!important;line-height:1.1!important;}
body.home .mg-home-section-title h2,body.front-page .mg-home-section-title h2{font-size:var(--mg-below-title)!important;line-height:1.1!important;}
.mg-section p,.mg-section-head p{font-size:12px!important;line-height:1.4!important;}
.mg-section-link,.mg-data-note{font-size:10px!important;}

/* ===== Shared page hero (page-platform.php) — its OWN hero stays frozen, but the
   toolbar/grid/filter panel/cards below it are shared below-hero components. ===== */
.mg-toolbar{margin-bottom:14px!important;gap:10px!important;}
.mg-toolbar .mg-search input,.mg-toolbar .mg-search button{height:var(--mg-below-control-h)!important;font-size:12px!important;padding:0 10px!important;}
.mg-toolbar-actions .mg-button{min-height:var(--mg-below-control-h)!important;font-size:11.5px!important;padding:0 12px!important;}
.mg-platform-grid{gap:12px!important;}
.mg-filter-panel{padding:var(--mg-below-panel-pad)!important;}
.mg-filter-panel h2{font-size:14px!important;margin:0 0 8px!important;}
.mg-filter-panel label{font-size:11px!important;margin-bottom:8px!important;}
.mg-filter-panel select{padding:7px!important;}
.mg-filter-panel .mg-button{min-height:var(--mg-below-control-h)!important;margin:6px 0 8px!important;}
.mg-inline-heading{margin-bottom:9px!important;gap:8px!important;}
.mg-inline-heading h2{font-size:var(--mg-below-title)!important;}

/* ===== Cards / panels (generic, shared by every template) ===== */
.mg-card,.mg-service-card,.mg-news-card,.mg-report-card,.mg-result-card,.mg-provider-card,
.mg-project-card,.mg-editorial-card,.mg-dashboard-card,.mg-sidebar-block,.mg-data-panel,
.mg-result-summary,.mg-feature-panel{
  padding:var(--mg-below-card-pad)!important;border-radius:8px!important;
}
.mg-card-body,.mg-project-card .mg-card-body,.mg-provider-card .mg-card-body,
.mg-editorial-card-body,.mg-report-card>div{padding:var(--mg-below-card-pad)!important;}
.mg-card h3,.mg-service-card h3,.mg-news-card h3,.mg-report-card h3,.mg-result-card h3,
.mg-provider-card h3,.mg-project-card h3,.mg-editorial-card h3,.mg-service-category h3{
  font-size:var(--mg-below-card-title)!important;line-height:1.18!important;margin:8px 0 5px!important;
}
.mg-card small,.mg-news-card small,.mg-result-card small,.mg-meta{font-size:9.5px!important;}
.mg-card p,.mg-provider-card p,.mg-project-card p,.mg-editorial-card p,.mg-service-category p,
.mg-report-card p{font-size:11px!important;line-height:1.36!important;margin:0 0 8px!important;}
.mg-card-grid,.mg-card-grid-3,.mg-card-grid-4,.mg-service-category-grid,.mg-news-card-grid,
.mg-mineral-grid,.mg-results-layout,.mg-report-grid,.mg-process-grid,.mg-split-grid,
.mg-related-minerals{gap:var(--mg-below-grid-gap)!important;}
.mg-card-image,.mg-editorial-image,.mg-editorial-thumb,.mg-platform-page .mg-card-image{min-height:82px!important;}
.mg-editorial-copy{padding:14px!important;}
.mg-editorial-copy h2{font-size:16px!important;line-height:1.16!important;margin:8px 0!important;}
.mg-article-meta{margin:8px 0 12px!important;}
.mg-project-facts{padding:7px 0!important;margin:8px 0!important;}
.mg-summary-line{padding-top:7px!important;}

/* Category/tile-style link cards (Services categories, Exploration mineral discovery). */
.mg-service-category-grid a,.mg-mineral-grid a,.mg-service-category{min-height:70px!important;padding:6px!important;border-radius:7px!important;gap:8px!important;}
.mg-service-category-grid strong,.mg-mineral-grid strong{font-size:11px!important;line-height:1.14!important;}
.mg-service-category-grid small,.mg-mineral-grid small{font-size:9px!important;}
.mg-category-icon{font-size:14px!important;width:26px!important;height:26px!important;}

/* News-specific shared components. */
.mg-news-tabs{padding-bottom:0!important;}
.mg-category-nav{padding-bottom:8px!important;gap:5px!important;}
.mg-category-nav a{padding:6px 10px!important;font-size:10.5px!important;}
.mg-news-feature{min-height:auto!important;}
.mg-mini-lines{height:56px!important;margin:8px 0!important;gap:6px!important;}
.mg-report-cover{min-height:80px!important;flex:0 0 72px!important;font-size:10px!important;}
.mg-report-card{gap:10px!important;}
.mg-news-cta{padding:16px!important;gap:16px!important;}
.mg-news-cta h2{font-size:17px!important;margin:0 0 6px!important;}
.mg-newsletter{min-width:0!important;gap:6px!important;}
.mg-newsletter input{padding:8px!important;min-height:var(--mg-below-control-h)!important;}

/* Provider/result filter sidebar (below hero — separate from hero search/chips). */
.mg-result-summary label,.mg-filter-grid label{font-size:10px!important;gap:4px!important;}
.mg-result-summary h3{font-size:14px!important;}
.mg-result-summary select,.mg-filter-grid select,.mg-filter-grid input,.mg-result-summary input{
  min-height:var(--mg-below-control-h)!important;height:var(--mg-below-control-h)!important;font-size:11px!important;padding:0 8px!important;margin-top:4px!important;
}
.mg-filter-grid{padding:var(--mg-below-panel-pad)!important;gap:6px!important;border-radius:8px!important;}
.mg-view-toggle button{min-height:28px!important;font-size:10.5px!important;padding:5px 9px!important;}

/* Buttons/CTAs that live in below-hero sections. */
.mg-section .mg-button,.mg-feature-panel .mg-button,.mg-split-grid .mg-button,
.mg-results-layout .mg-button,.mg-process-grid .mg-button,.mg-result-summary .mg-button{
  min-height:var(--mg-below-control-h)!important;font-size:11px!important;padding:6px 11px!important;border-radius:6px!important;
}
.mg-feature-panel h2{font-size:16px!important;line-height:1.16!important;margin:0 0 6px!important;}
.mg-feature-panel p{font-size:11.5px!important;line-height:1.38!important;margin:0 0 8px!important;}
.mg-process-grid>div{padding:12px!important;}
.mg-process-grid b{font-size:16px!important;}
.mg-process-grid h3{font-size:12.5px!important;margin:8px 0 4px!important;}
.mg-process-grid p{font-size:11px!important;}

/* GIS/map chrome shared by homepage, exploration, and reference-module (map/tenders/etc). */
.mg-data-map .mg-map-art,.mg-map-art{min-height:280px!important;}
.mg-data-panel{padding:10px!important;gap:8px!important;}
.mg-data-panel h3{font-size:13px!important;}
.mg-data-panel label{font-size:10.5px!important;}
.mg-map-controls button{width:26px!important;height:26px!important;font-size:12px!important;}

/* Icon system below hero. */
.mg-icon-sm{width:var(--mg-below-icon-sm)!important;height:var(--mg-below-icon-sm)!important;}
.mg-icon-md{width:var(--mg-below-icon-md)!important;height:var(--mg-below-icon-md)!important;}
.mg-icon-lg{width:var(--mg-below-icon-lg)!important;height:var(--mg-below-icon-lg)!important;}

/* ===== Homepage below-hero (KPI strip, map module, mineral rail, dashboard) ===== */
body.home .mg-home-kpi,body.front-page .mg-home-kpi{min-height:44px!important;padding:6px 8px!important;gap:6px!important;}
body.home .mg-home-kpi small,body.front-page .mg-home-kpi small{font-size:8.5px!important;}
body.home .mg-home-kpi strong,body.front-page .mg-home-kpi strong{font-size:12px!important;}
body.home .mg-home-kpi em,body.front-page .mg-home-kpi em{font-size:8px!important;}
body.home .mg-kpi-spark,body.front-page .mg-kpi-spark{width:22px!important;height:13px!important;}
body.home .mg-home-map-layout,body.front-page .mg-home-map-layout{gap:9px!important;}
body.home .mg-home-map,body.front-page .mg-home-map{min-height:280px!important;}
body.home .mg-home-map-sidebar,body.front-page .mg-home-map-sidebar{gap:7px!important;}
body.home .mg-map-toolbar,body.front-page .mg-map-toolbar{font-size:8px!important;gap:4px!important;}
body.home .mg-home-map-controls button,body.front-page .mg-home-map-controls button{width:24px!important;height:24px!important;font-size:11px!important;}
body.home .mg-home-map-legend,body.front-page .mg-home-map-legend{font-size:8px!important;gap:5px!important;}
body.home .mg-mineral-rail,body.front-page .mg-mineral-rail{gap:6px!important;}
body.home .mg-mineral-price,body.front-page .mg-mineral-price{padding:7px!important;gap:6px!important;border-radius:7px!important;min-height:96px!important;}
body.home .mg-mineral-price small,body.front-page .mg-mineral-price small{font-size:9px!important;}
body.home .mg-mineral-price strong,body.front-page .mg-mineral-price strong{font-size:11px!important;}
body.home .mg-dashboard-grid,body.front-page .mg-dashboard-grid{gap:8px!important;}
body.home .mg-dashboard-card,body.front-page .mg-dashboard-card{padding:8px!important;}
body.home .mg-dashboard-head,body.front-page .mg-dashboard-head{margin-bottom:5px!important;}
body.home .mg-dashboard-head h3,body.front-page .mg-dashboard-head h3{font-size:12px!important;gap:5px!important;}
body.home .mg-compact-row,body.front-page .mg-compact-row{padding:5px 0!important;gap:6px!important;}
body.home .mg-compact-row strong,body.front-page .mg-compact-row strong{font-size:10.5px!important;}
body.home .mg-compact-row small,body.front-page .mg-compact-row small{font-size:8.5px!important;}

/* ===== Mineral detail below-hero (KPI strip, GIS section, trend, related minerals) ===== */
.mg-mineral-kpis article{padding:6px 7px!important;grid-template-columns:16px 1fr!important;gap:5px!important;}
.mg-mineral-kpis article img{width:14px!important;height:14px!important;}
.mg-mineral-kpis small{font-size:8px!important;}
.mg-mineral-kpis strong{font-size:11px!important;}
.mg-mineral-map-layout{gap:9px!important;}
.mg-mineral-summary{padding:10px!important;border-radius:8px!important;}
.mg-mineral-summary div{padding:4px 0!important;font-size:11px!important;}
.mg-mineral-map{min-height:190px!important;border-radius:9px!important;}
.mg-mineral-trend{gap:9px!important;padding:10px!important;border-radius:8px!important;}
.mg-mineral-trend h2{font-size:14px!important;}
.mg-trend-bars{height:64px!important;}
.mg-mineral-trend h3{font-size:11.5px!important;}
.mg-mineral-trend p{font-size:10.5px!important;}
.mg-related-minerals a{min-height:72px!important;padding:6px!important;border-radius:7px!important;}
.mg-related-minerals a img{height:36px!important;}
.mg-related-minerals strong{font-size:10.5px!important;}
.mg-related-minerals span{font-size:9px!important;}

/* ===== Responsive: keep desktop 75%-density target, preserve mobile usability ===== */
@media (max-width:1366px) and (min-width:1001px){
  :root{--mg-below-section-pad:18px;--mg-below-home-section-pad:24px;}
}
@media (max-width:1100px){
  body .mg-section{padding-top:20px!important;}
  body.home .mg-home-section,body.front-page .mg-home-section{padding-top:22px!important;}
  .mg-platform-grid{grid-template-columns:1fr!important;}
  .mg-card-grid,.mg-card-grid-3,.mg-card-grid-4,.mg-service-category-grid,.mg-news-card-grid,
  .mg-mineral-grid,.mg-results-layout,.mg-report-grid,.mg-process-grid,.mg-split-grid,
  .mg-related-minerals{gap:8px!important;}
}
@media (max-width:780px){
  /* Mobile keeps touch-friendly control height and readable text; not scaled to desktop 75% target. */
  .mg-result-summary select,.mg-filter-grid select,.mg-filter-grid input,.mg-result-summary input,
  .mg-toolbar .mg-search input,.mg-toolbar .mg-search button,.mg-filter-panel select,
  .mg-section .mg-button,.mg-feature-panel .mg-button,.mg-split-grid .mg-button,
  .mg-results-layout .mg-button,.mg-process-grid .mg-button,.mg-toolbar-actions .mg-button,
  .mg-filter-panel .mg-button{min-height:40px!important;height:auto!important;font-size:13px!important;}
  .mg-card,.mg-service-card,.mg-news-card,.mg-report-card,.mg-result-card,.mg-provider-card,
  .mg-project-card,.mg-editorial-card,.mg-dashboard-card,.mg-sidebar-block,.mg-data-panel,
  .mg-result-summary,.mg-feature-panel,.mg-filter-panel{padding:12px!important;}
  .mg-service-category-grid a,.mg-mineral-grid a,.mg-service-category{min-height:96px!important;padding:10px!important;}
  .mg-related-minerals a{min-height:96px!important;padding:9px!important;}
  .mg-related-minerals a img{height:52px!important;}
  .mg-card-image,.mg-editorial-image,.mg-editorial-thumb,.mg-platform-page .mg-card-image{min-height:120px!important;}
  .mg-report-cover{min-height:120px!important;flex:0 0 100px!important;}
  body.home .mg-home-map,body.front-page .mg-home-map{min-height:280px!important;}
  .mg-mineral-map{min-height:220px!important;}
  .mg-data-map .mg-map-art,.mg-map-art{min-height:300px!important;}
}
@media (max-width:480px){
  .mg-card-grid,.mg-card-grid-3,.mg-card-grid-4,.mg-service-category-grid,.mg-news-card-grid,
  .mg-mineral-grid,.mg-results-layout,.mg-report-grid,.mg-process-grid,.mg-split-grid,
  .mg-related-minerals{gap:10px!important;}
}
