/* InsideGaming mobile foundation v1.0 — shared structure, theme color inheritance */
.ig-mobile-menu-toggle,.ig-mobile-menu{display:none}
@media (max-width: 900px){
 html,body{max-width:100%;overflow-x:clip}
 *,*::before,*::after{box-sizing:border-box}
 .site-container{width:100%!important;max-width:100%!important;min-width:0!important;margin:0 auto!important}
 .main-wrapper{display:block!important;width:100%!important;min-width:0!important;padding:0!important}
 .sidebar-left,.sidebar-right{display:none!important}
 .site-content{width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;margin:0!important;overflow:visible!important}
 .content-wrapper{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:12px!important}
 .site-content img,.content-wrapper img{max-width:100%;height:auto}
 .site-content iframe,.content-wrapper iframe{max-width:100%}
 .ig-modern-brandbar-inner{width:100%!important;max-width:100%!important;min-width:0!important;padding:10px 12px!important;gap:10px!important}
 .ig-modern-logo{width:clamp(135px,34vw,200px)!important;max-width:42%!important;min-width:0!important}
 .ig-modern-header-tools{min-width:0!important;gap:6px!important}
 .ig-modern-search{width:40px!important;min-width:40px!important;height:40px!important}
 .ig-modern-search input{display:none!important}
 .ig-modern-search button{width:40px!important;height:40px!important}
 .ig-modern-icon-btn{width:40px!important;height:40px!important}
 .ig-modern-account strong,.ig-modern-account>i{display:none!important}
 .ig-modern-nav{display:none!important}
 .ig-mobile-menu-toggle{display:flex;align-items:center;justify-content:center;gap:9px;width:calc(100% - 24px);margin:0 12px 8px;padding:12px 16px;background:var(--bg-darker,#151019);color:var(--accent,#9cff00);border:1px solid var(--border-dark,#49324d);border-radius:10px;font:inherit;font-weight:800;cursor:pointer}
 .ig-mobile-menu:not([hidden]){display:block;margin:0 12px 12px;padding:8px;border:1px solid var(--border-dark,#49324d);background:var(--bg-darker,#151019);border-radius:12px}
 .ig-mobile-menu nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .ig-mobile-menu a{display:block;padding:12px 10px;border-radius:8px;background:rgba(127,127,127,.09);color:inherit;text-decoration:none;font-weight:700;font-size:13px}
 .ig-mobile-menu a:focus-visible,.ig-mobile-menu-toggle:focus-visible{outline:2px solid var(--accent,#9cff00);outline-offset:2px}
 .site-content .ig-home-page,.ig-home-page{max-width:100%!important;min-width:0!important}
 .ig-home-page .content-wrapper{padding:12px!important}
 .ig-home-page :is(.news-grid,.posts-grid,.video-grid,.cards-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:540px){
 .ig-modern-brandbar-inner{flex-wrap:wrap!important;justify-content:space-between!important}
 .ig-modern-logo{width:145px!important;max-width:45%!important}
 .ig-modern-header-tools{flex:0 1 auto!important}
 .ig-modern-register{display:none!important}
 .ig-home-page :is(.news-grid,.posts-grid,.video-grid,.cards-grid){grid-template-columns:minmax(0,1fr)!important}
 .ig-mobile-menu nav{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* InsideGaming Mobile Phase 1.1 – responsive homepage news slider.
   Works in Classic and Vice City; desktop remains unchanged. */
@media (max-width:900px) {
  .ig-news-slider {
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:4px 0 18px!important;overflow:hidden!important;
    border-radius:14px!important;
  }
  .ig-news-slider-track {height:410px!important;min-height:410px!important;}
  .ig-news-slide,.ig-news-slide.is-active {
    height:410px!important;min-height:410px!important;overflow:hidden!important;
  }
  .ig-news-slide-image,.ig-news-slide-image img {
    width:100%!important;height:100%!important;min-height:0!important;
  }
  .ig-news-slide-image img {object-fit:cover!important;object-position:center!important;}
  .ig-news-slide-overlay {
    background:linear-gradient(0deg,rgba(4,4,8,.97) 0%,rgba(4,4,8,.88) 24%,rgba(4,4,8,.35) 70%,rgba(4,4,8,.1) 100%)!important;
  }
  .ig-news-slide-content {
    position:absolute!important;left:20px!important;right:20px!important;
    top:auto!important;bottom:65px!important;
    width:auto!important;max-width:none!important;
    margin:0!important;padding:0!important;
    text-align:left!important;transform:none!important;
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    gap:0!important;
  }
  .ig-news-slide-content::before {display:none!important;}
  .ig-news-slide-meta {display:flex!important;flex-wrap:wrap!important;gap:7px!important;margin:0 0 12px!important;font-size:11px!important;}
  .ig-news-slide-content h1 {
    width:100%!important;max-width:100%!important;
    margin:0 0 16px!important;padding:0!important;
    font-size:clamp(23px,4.5vw,32px)!important;line-height:1.15!important;
    letter-spacing:-.025em!important;
    overflow-wrap:break-word!important;word-break:normal!important;
    display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden!important;
  }
  .ig-news-slide-button {
    padding:10px 14px!important;font-size:12px!important;line-height:1.25!important;
    min-height:42px!important;max-width:100%!important;
  }
  .ig-news-slider-arrow {
    width:35px!important;height:35px!important;top:45%!important;
    transform:translateY(-50%)!important;
  }
  .ig-news-slider-prev {left:8px!important;}
  .ig-news-slider-next {right:8px!important;}
  .ig-news-slider-archive {
    top:12px!important;right:12px!important;
    padding:7px 9px!important;font-size:10px!important;
  }
  .ig-news-slider-dots {
    bottom:17px!important;left:50%!important;
    transform:translateX(-50%)!important;
    max-width:calc(100% - 32px)!important;
  }
}
@media(max-width:540px){
  .ig-news-slider-track {height:385px!important;min-height:385px!important;}
  .ig-news-slide,.ig-news-slide.is-active {height:385px!important;min-height:385px!important;}
  .ig-news-slide-content {left:16px!important;right:16px!important;bottom:60px!important;}
  .ig-news-slide-content h1 {font-size:clamp(21px,5.7vw,27px)!important;line-height:1.13!important;margin-bottom:13px!important;}
  .ig-news-slide-meta {font-size:10px!important;margin-bottom:10px!important;}
  .ig-news-slide-category {max-width:100%!important;}
  .ig-news-slider-arrow {width:31px!important;height:31px!important;top:42%!important;}
}
@media(max-width:370px){
  .ig-news-slider-track {height:365px!important;min-height:365px!important;}
  .ig-news-slide,.ig-news-slide.is-active {height:365px!important;min-height:365px!important;}
  .ig-news-slide-content h1 {font-size:21px!important;}
}

/* Phase 1.2: equal mobile left/right gutters on homepage sections.
   Scoped to the homepage, applies to Classic and Vice City only below 901px. */
@media (max-width:900px) {
  .site-content.ig-home-page {
    --ig-mobile-gutter: 14px;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0 var(--ig-mobile-gutter) 24px!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow-x:clip!important;
  }
  .site-content.ig-home-page > .ig-news-slider,
  .site-content.ig-home-page > .ig-gta6-countdown,
  .site-content.ig-home-page > .ig-home-section-heading,
  .site-content.ig-home-page > .content-wrapper.ig-news-list {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
  .site-content.ig-home-page > .content-wrapper.ig-news-list {
    padding:0!important;
    display:block!important;
  }
  .site-content.ig-home-page .ig-news-list > .ig-news-card {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
  .site-content.ig-home-page .ig-news-list .ig-post-hero,
  .site-content.ig-home-page .ig-news-list .ig-news-card-body {
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .site-content.ig-home-page > .ig-home-section-heading {
    display:flex!important;
    align-items:flex-end!important;
    justify-content:space-between!important;
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  .site-content.ig-home-page > .ig-home-section-heading > * {
    min-width:0!important;
  }
}
@media(max-width:540px) {
  .site-content.ig-home-page { --ig-mobile-gutter: 14px; }
  .site-content.ig-home-page > .ig-news-slider {
    margin-top:8px!important;
    margin-bottom:18px!important;
  }
  .site-content.ig-home-page > .ig-gta6-countdown {
    margin-top:0!important;
    margin-bottom:20px!important;
  }
  .site-content.ig-home-page .ig-news-list .ig-post-title {
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }
}

/* Phase 1.3 — consistent mobile gutters across all WordPress theme pages.
   Preserves the homepage's existing 14px gutter and desktop layouts. */
@media (max-width:900px) {
  .main-wrapper > .site-content {
    --ig-mobile-gutter:14px;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0 var(--ig-mobile-gutter) 24px!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow-x:clip!important;
  }
  .main-wrapper > .site-content > .content-wrapper {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  .main-wrapper > .site-content > .content-wrapper > :is(article,main,section),
  .main-wrapper > .site-content > :is(article,main,section) {
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .main-wrapper > .site-content :is(img,video,iframe) {max-width:100%!important;}
  .main-wrapper > .site-content :is(table,pre) {max-width:100%;}
  .main-wrapper > .site-content :is(h1,h2,h3,p) {overflow-wrap:break-word;}
}

/* Phase 1.4: prevent the desktop right navigation from appearing
   below the content on mobile, on EVERY page in both themes. */
@media screen and (max-width:900px) {
  .main-wrapper > .navi2,
  .main-wrapper > .sidebar-right,
  .site-container .navi2,
  .site-container .sidebar-right,
  aside.navi2,
  aside.sidebar-right {
    display:none!important;
    visibility:hidden!important;
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    flex:0 0 0!important;
    height:0!important;
    overflow:hidden!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
  }
  .main-wrapper {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .main-wrapper > .site-content {
    display:block!important;
    flex:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}

/* Phase 1.5 — account/login/register responsive layout, Classic + Vice City */
@media screen and (max-width:900px) {
  .ig-modern-brandbar, .ig-modern-brandbar-inner,
  .ig-modern-header-tools {min-width:0!important;box-sizing:border-box!important;}
  .ig-modern-brandbar-inner {
    width:100%!important;max-width:100%!important;
    padding:12px 14px!important;gap:8px!important;
    display:flex!important;flex-wrap:wrap!important;align-items:center!important;
  }
  .ig-modern-logo {flex:0 1 auto!important;min-width:0!important;max-width:46%!important;}
  .ig-modern-header-tools {margin-left:auto!important;display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;}
  .ig-modern-login,.ig-modern-register {
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    white-space:nowrap!important;box-sizing:border-box!important;
    font-size:12px!important;line-height:1.2!important;
    padding:10px 12px!important;min-height:40px!important;
    width:auto!important;max-width:100%!important;
  }
  .ig-modern-register {border-radius:9px!important;}
  .ig-login-shell,.ig-register-shell {
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:10px auto 24px!important;box-sizing:border-box!important;overflow:hidden!important;
  }
  .ig-login-shell *, .ig-register-shell * {box-sizing:border-box;}
  .ig-login-header,.ig-register-header {
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    gap:10px!important;padding:20px 16px!important;
    width:100%!important;min-width:0!important;
  }
  .ig-login-header h1,.ig-register-header h1 {font-size:clamp(24px,6vw,31px)!important;line-height:1.15!important;}
  .ig-login-header p,.ig-register-header p {font-size:14px!important;line-height:1.5!important;}
  .ig-login-register-link,.ig-register-login {
    margin:2px 0 0!important;text-align:left!important;
    white-space:normal!important;font-size:13px!important;
  }
  .ig-login-body {padding:15px 12px!important;}
  .ig-login-card {width:100%!important;max-width:100%!important;padding:18px 14px!important;}
  .ig-login-card-head {gap:10px!important;}
  .ig-login-card-head h2 {font-size:20px!important;}
  .ig-login-field input,.ig-register-shell input:not([type=checkbox]):not([type=radio]),
  .ig-register-shell select {max-width:100%!important;min-width:0!important;font-size:16px!important;}
  .ig-login-shell button,.ig-register-shell button {max-width:100%!important;}
  .ig-login-shell .ig-login-social,
  .ig-login-shell .ig-social-login,
  .ig-login-shell .ig-social-buttons {width:100%!important;max-width:100%!important;}
  .ig-login-shell .ig-login-social a,
  .ig-login-shell .ig-social-login a,
  .ig-login-shell .ig-social-buttons a {max-width:100%!important;}
  .ig-register-progress {
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;padding:12px 9px!important;
  }
  .ig-register-progress .ig-step {min-width:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;gap:5px!important;}
  .ig-register-progress .ig-step span {flex:none!important;}
  .ig-register-progress .ig-step strong {font-size:10px!important;line-height:1.2!important;overflow-wrap:anywhere!important;}
  .ig-register-step {padding:18px 13px!important;min-height:0!important;}
  .ig-register-step-head {align-items:flex-start!important;gap:10px!important;}
  .ig-register-step-head h2 {font-size:20px!important;}
  .ig-form-grid {grid-template-columns:minmax(0,1fr)!important;gap:13px!important;}
  .ig-full {grid-column:1/-1!important;}
  .ig-register-actions {display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  .ig-register-actions .button {min-height:42px!important;}
}
@media screen and (max-width:480px) {
  .ig-modern-brandbar-inner {padding:10px 12px!important;}
  .ig-modern-logo {max-width:100%!important;flex:1 1 100%!important;}
  .ig-modern-header-tools {margin-left:0!important;width:100%!important;justify-content:flex-end!important;}
  .ig-modern-login,.ig-modern-register {flex:1 1 auto!important;min-width:0!important;}
  .ig-login-footer {flex-wrap:wrap!important;}
}

/* Mobile 1.6 — separate news-slider CTA from slide pagination.
   Keep the CTA in the content area and give the dots a dedicated bottom row. */
@media screen and (max-width:900px) {
  .ig-news-slider .ig-news-slide-content {
    bottom:94px!important;
  }
  .ig-news-slider .ig-news-slider-dots {
    position:absolute!important;
    bottom:17px!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    z-index:7!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    width:max-content!important;
    max-width:calc(100% - 36px)!important;
    margin:0!important;
  }
  .ig-news-slider .ig-news-slide-button {
    position:relative!important;
    z-index:6!important;
    margin-bottom:0!important;
  }
}
@media screen and (max-width:540px) {
  .ig-news-slider .ig-news-slide-content {
    bottom:92px!important;
  }
  .ig-news-slider .ig-news-slider-dots {bottom:15px!important;}
  .ig-news-slider .ig-news-slide-content h1 {
    -webkit-line-clamp:3!important;
  }
}

/* v1.7: Pagination in the free top-left corner, clear of bottom CTA.
   Works with both Classic and Vice City, without changing desktop. */
@media screen and (max-width:900px) {
  .ig-news-slider .ig-news-slider-dots,
  body.ig-vice-edition .ig-news-slider .ig-news-slider-dots {
    position:absolute!important;
    top:18px!important;
    bottom:auto!important;
    left:18px!important;
    right:auto!important;
    transform:none!important;
    margin:0!important;
    width:max-content!important;
    max-width:calc(100% - 190px)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:7px!important;
    z-index:12!important;
  }
  .ig-news-slider .ig-news-slide-content {
    bottom:24px!important;
  }
}
@media screen and (max-width:540px) {
  .ig-news-slider .ig-news-slider-dots,
  body.ig-vice-edition .ig-news-slider .ig-news-slider-dots {
    top:18px!important;
    left:16px!important;
    max-width:calc(100% - 165px)!important;
  }
  .ig-news-slider .ig-news-slide-content {
    bottom:23px!important;
  }
}
