/*
 * Minegolia responsive mirror — desktop remains the master.
 * Base rule only hides duplicate mobile navigation actions; layout changes begin at 1100px.
 */
.mg-mobile-nav-actions{display:none}

@media (max-width:1100px){
  .mg-header{z-index:2000}
  .mg-header-inner{position:relative;min-height:64px;gap:12px}
  .mg-brand{order:1}
  .mg-header-actions{order:2;margin-left:auto}
  .mg-menu-toggle{order:3;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;margin-left:0;padding:8px 12px;white-space:nowrap}
  .mg-navigation{display:none;position:absolute;z-index:30;top:100%;left:calc((100vw - 100%)/-2);right:calc((100vw - 100%)/-2);max-height:calc(100vh - 64px);overflow-y:auto;padding:12px max(16px,calc((100vw - min(100vw - 32px,var(--mg-master-container,100%)))/2)) 18px;background:#07151c;border-bottom:1px solid var(--mg-border);box-shadow:0 16px 36px rgba(0,0,0,.38)}
  .mg-navigation.is-open{display:block}
  .mg-nav-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px}
  .mg-nav-list li{min-width:0}
  .mg-nav-list a{display:flex;align-items:center;min-height:44px;padding:9px 12px;border:1px solid transparent;border-radius:6px;font-size:13px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
  .mg-nav-list a:hover,.mg-nav-list a:focus{background:rgba(215,166,65,.08);border-color:rgba(215,166,65,.18)}
  .mg-header-actions .mg-button{min-height:44px}

  main section,.mg-container,.mg-header-inner,.mg-module-hero-grid,.mg-home-hero-inner,
  .mg-card-grid,.mg-results-layout,.mg-filter-grid,.mg-split-grid,.mg-news-grid,
  .mg-preview-layout,.mg-preview-panel,.mg-footer-grid{min-width:0}
  img{max-width:100%;height:auto}
  .mg-filter-chips,.mg-popular,.mg-partner-row,.mg-toolbar-actions{flex-wrap:wrap}
}

@media (max-width:780px){
  .mg-header-actions .mg-button{display:none!important}
  .mg-header-actions .mg-lang{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:6px 9px;border:1px solid var(--mg-border);border-radius:8px;color:var(--mg-text)}
  .mg-mobile-nav-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(215,166,65,.2)}
  .mg-mobile-nav-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 10px;border:1px solid var(--mg-border);border-radius:7px;color:var(--mg-gold-light);font-size:13px;font-weight:700;text-align:center;overflow-wrap:anywhere}
  .mg-mobile-nav-actions .mg-mobile-register{background:linear-gradient(135deg,#e0ae49,#c98f28);color:#17120a}

  h1,h2,h3,.mg-section-head,.mg-home-section-title{max-width:100%;height:auto!important;max-height:none!important;overflow:visible!important;overflow-wrap:anywhere}
  .mg-section-head,.mg-home-section-title{align-items:flex-start;flex-wrap:wrap}
  .mg-button,.mg-tag,.mg-section-link{white-space:normal;text-wrap:balance}
  .mg-footer-grid>div{min-width:0}
  .mg-footer-grid a:not(.mg-brand){display:flex;align-items:center;min-height:44px;margin-bottom:2px}
  .mg-newsletter input,.mg-newsletter button{min-height:44px}
}

@media (max-width:600px){
  .mg-nav-list{grid-template-columns:1fr}
  .mg-navigation{padding-bottom:max(18px,env(safe-area-inset-bottom))}
}

@media (max-width:480px){
  .mg-container,.mg-home-section .mg-container{width:min(calc(100% - 28px),var(--mg-master-container,100%))}
  .mg-header-inner{width:min(calc(100% - 24px),var(--mg-master-container,100%));min-height:64px;gap:7px}
  .mg-brand{gap:6px;font-size:18px}
  .mg-brand .mg-logo-mark{width:44px!important;height:29px!important;flex:0 0 44px}
  .mg-menu-toggle{min-width:58px;padding-inline:9px;font-size:12px}
  .mg-header-actions{gap:6px}
  .mg-header-actions .mg-lang{font-size:12px}
  .mg-mobile-nav-actions{grid-template-columns:1fr}

  html body.mg-site.mg-site.mg-site .mg-button,
  html body.mg-site.mg-site.mg-site button:not(.mg-preview-legend-toggle),
  html body.mg-site.mg-site.mg-site input:not([type="checkbox"]):not([type="radio"]),
  html body.mg-site.mg-site.mg-site select,
  html body.mg-site.mg-site.mg-site textarea{min-height:44px!important;height:auto!important}
  html body.mg-site.mg-site.mg-site .mg-preview-legend-toggle{display:flex;align-items:center;min-height:44px!important;height:auto!important;padding-block:8px}
  html body.mg-site .mg-preview-control,
  html body.mg-site .mg-map-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important}

  .mg-module-search input,.mg-module-search button,
  .mg-home-search input,.mg-home-search button,
  .mg-filter-grid select,.mg-filter-grid input,
  .mg-result-summary select{min-height:44px!important;height:44px!important}
  .mg-filter-button{width:44px!important;min-width:44px!important}
  body.page-template-page-map .mg-map-layer-panel{max-height:calc(100% - 348px)!important}
  .mg-filter-grid,.mg-toolbar-actions,.mg-process-grid{grid-template-columns:1fr!important}
  .mg-mineral-grid,.mg-service-category-grid,.mg-news-card-grid,
  .mg-card-grid-3,.mg-card-grid-4,.mg-dashboard-grid,.mg-report-grid{grid-template-columns:1fr!important}
  .mg-card,.mg-service-card,.mg-news-card,.mg-report-card,.mg-feature-panel,
  .mg-result-card,.mg-dashboard-card{min-width:0;max-width:100%}
  .mg-page-hero h1,.mg-module-hero h1,.mg-home-hero h1{max-width:100%;text-wrap:balance}
  .mg-toolbar-actions .mg-button{width:100%}
  .mg-footer-bottom{overflow-wrap:anywhere}
}

@media (max-width:380px){
  .mg-brand{font-size:17px}
  .mg-brand .mg-logo-mark{width:41px!important;height:27px!important;flex-basis:41px}
  .mg-menu-toggle{min-width:52px;padding-inline:7px}
  .mg-header-actions .mg-lang{min-width:44px;padding-inline:6px}
}

/* Phone-only compact UX polish; desktop/tablet structure remains the source of truth. */
@media (min-width:601px){
  .mg-dashboard-toggle{display:none!important}
}

@media (max-width:600px){
  body.home .mg-home-section,body.front-page .mg-home-section{padding-top:20px!important}
  body.home .mg-home-section-title,body.front-page .mg-home-section-title{margin-bottom:12px!important;gap:8px}

  body.home .mg-home-kpi,body.front-page .mg-home-kpi{
    display:grid!important;grid-template-columns:24px minmax(0,1fr);align-items:center;
    min-height:64px!important;padding:5px!important;gap:5px!important
  }
  body.home .mg-home-kpi .mg-icon-img,body.front-page .mg-home-kpi .mg-icon-img{width:22px!important;height:22px!important;margin:0!important}
  body.home .mg-home-kpi small,body.front-page .mg-home-kpi small{font-size:9px!important;line-height:1.2!important}
  body.home .mg-home-kpi strong,body.front-page .mg-home-kpi strong{font-size:12px!important;line-height:1.15!important}
  body.home .mg-home-kpi em,body.front-page .mg-home-kpi em{font-size:8px!important;line-height:1.15!important}

  body.home .mg-mineral-rail,body.front-page .mg-mineral-rail{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important
  }
  html body.home .mg-mineral-price,html body.front-page .mg-mineral-price{
    grid-template-columns:minmax(0,1fr) 14px!important;grid-template-rows:48px auto!important;
    align-content:start!important;min-width:0!important;min-height:108px!important;
    padding:7px!important;gap:5px 4px!important;border-radius:8px!important
  }
  body.home .mg-mineral-price .mg-mineral-photo,body.front-page .mg-mineral-price .mg-mineral-photo{
    grid-column:1/-1;width:100%!important;height:48px!important;display:flex;align-items:center;justify-content:center
  }
  body.home .mg-mineral-price .mg-mineral-image,body.front-page .mg-mineral-price .mg-mineral-image{
    width:60px!important;height:46px!important;object-fit:contain!important
  }
  body.home .mg-mineral-price>div:not(.mg-mineral-photo),body.front-page .mg-mineral-price>div:not(.mg-mineral-photo){
    min-width:0;display:grid;align-content:start;gap:1px
  }
  body.home .mg-mineral-price small,body.front-page .mg-mineral-price small{font-size:9px!important;line-height:1.15!important;overflow-wrap:anywhere}
  body.home .mg-mineral-price strong,body.front-page .mg-mineral-price strong{font-size:12px!important;line-height:1.1!important}
  body.home .mg-mineral-price em,body.front-page .mg-mineral-price em{font-size:8px!important;line-height:1.1!important}
  body.home .mg-mineral-price>span,body.front-page .mg-mineral-price>span{align-self:end;font-size:13px}

  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{align-items:center;margin-bottom:4px!important;gap:6px!important}
  body.home .mg-dashboard-head h3,body.front-page .mg-dashboard-head h3{min-width:0;font-size:12px!important}
  body.home .mg-dashboard-head .mg-dashboard-all,body.front-page .mg-dashboard-head .mg-dashboard-all{display:none!important}
  body.home .mg-dashboard-toggle,body.front-page .mg-dashboard-toggle{
    display:inline-flex!important;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;
    min-height:44px!important;height:44px!important;margin-left:auto;padding:5px 7px!important;
    border:1px solid rgba(215,166,65,.22);border-radius:6px;background:rgba(215,166,65,.06);
    color:var(--mg-gold-light);font:800 9px/1.15 inherit;cursor:pointer
  }
  body.home .mg-dashboard-toggle:focus-visible,body.front-page .mg-dashboard-toggle:focus-visible{outline:2px solid var(--mg-gold);outline-offset:2px}
  body.home .mg-dashboard-card.is-mobile-collapsible>.mg-compact-row,
  body.front-page .mg-dashboard-card.is-mobile-collapsible>.mg-compact-row{
    max-height:58px;min-height:44px;opacity:1;overflow:hidden;
    transition:max-height .24s ease,opacity .2s ease,padding .24s ease,border-width .24s ease
  }
  body.home .mg-dashboard-card.is-mobile-collapsible:not(.is-expanded)>.mg-compact-row:nth-of-type(n+3),
  body.front-page .mg-dashboard-card.is-mobile-collapsible:not(.is-expanded)>.mg-compact-row:nth-of-type(n+3){
    max-height:0;min-height:0!important;padding-block:0!important;border-width:0!important;opacity:0;pointer-events:none
  }

  body.home .mg-preview-map-shell,body.front-page .mg-preview-map-shell{height:250px!important}
  body.page-template-page-exploration .mg-preview-map-shell.is-exploration{height:280px!important}
  body.home .mg-preview-panel,body.front-page .mg-preview-panel,
  body.page-template-page-exploration .mg-preview-panel{gap:4px!important;padding:8px!important}
  body.home .mg-preview-capabilities,body.front-page .mg-preview-capabilities,
  body.page-template-page-exploration .mg-preview-capabilities{gap:2px!important;font-size:9px!important;line-height:1.2!important}
  body.home .mg-preview-capabilities li,body.front-page .mg-preview-capabilities li,
  body.page-template-page-exploration .mg-preview-capabilities li{gap:5px;padding-bottom:1px!important}
  body.home .mg-preview-source,body.front-page .mg-preview-source,
  body.page-template-page-exploration .mg-preview-source{padding:5px!important;font-size:9px!important;line-height:1.25!important}
  body.home .mg-preview-cta,body.front-page .mg-preview-cta,
  body.page-template-page-exploration .mg-preview-cta{width:100%;min-height:44px!important;margin-top:0!important}

  html body.mg-site .mg-footer .mg-partners{padding:9px 0!important;gap:7px!important;font-size:10px!important}
  html body.mg-site .mg-footer .mg-partner-row{gap:5px!important}
  html body.mg-site .mg-footer .mg-partner-row b{padding:5px 7px!important;font-size:9px!important}
  html body.mg-site .mg-footer .mg-footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:16px 0!important;gap:14px 12px!important
  }
  html body.mg-site .mg-footer .mg-footer-grid>div{min-width:0;gap:3px!important}
  html body.mg-site .mg-footer .mg-footer-grid>div:first-child,
  html body.mg-site .mg-footer .mg-footer-grid>div:nth-child(4),
  html body.mg-site .mg-footer .mg-footer-grid>div:last-child{grid-column:1/-1}
  html body.mg-site .mg-footer .mg-footer-grid h3{margin:0 0 5px!important;font-size:12px!important}
  html body.mg-site .mg-footer .mg-footer-grid p{margin:0 0 5px!important;font-size:11px!important;line-height:1.35!important}
  html body.mg-site .mg-footer .mg-footer-grid a:not(.mg-brand){display:flex;align-items:center;min-height:28px!important;margin:0!important;font-size:11px!important;line-height:1.25!important}
  html body.mg-site .mg-footer .mg-brand-footer{margin-bottom:5px}
  html body.mg-site .mg-footer .mg-newsletter{gap:5px!important}
  html body.mg-site .mg-footer .mg-newsletter input,
  html body.mg-site .mg-footer .mg-newsletter button{min-height:44px!important;height:44px!important}
  html body.mg-site .mg-footer .mg-footer-bottom{padding:10px 0!important;gap:6px!important;font-size:10px!important;line-height:1.35!important;flex-wrap:wrap}
}
