/*
Theme Name:  Jashan Mods
Theme URI:   https://jashanmods.com
Description: Jashan Mods Child Theme for GeneratePress — custom homepage, Mod Games layout, optimized search. Old posts untouched.
Author:      Jashan
Author URI:  https://jashanmods.com
Template:    generatepress
Version:     1.0.0
License:     GNU General Public License v2 or later
Tags:        child-theme, mods, games
*/

/* =============================================
   GLOBAL RESET & VARIABLES
============================================= */
:root {
  --jm-red:     #e53935;
  --jm-dark:    #1a1a1a;
  --jm-green:   #22c55e;
  --jm-bg:      #f2f2f2;
  --jm-white:   #ffffff;
  --jm-border:  #ececec;
  --jm-muted:   #aaaaaa;
  --jm-text:    #1a1a1a;
  --jm-radius:  12px;
}

/* =============================================
   MOBILE OVERFLOW FIX
============================================= */
html, body {
  /* overflow-x: hidden removed — was blocking Telegram ad popups/overlays */
  width: 100% !important;
  max-width: 100% !important;
}

body.jm-active .site,
body.jm-active .site-content,
body.jm-active .grid-container,
body.jm-active #page,
body.jm-active #content,
body.jm-active #primary,
body.jm-active .content-area,
body.jm-active .site-main,
body.jm-active #main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
html body.jm-active,
body.jm-active {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Only apply our styles to homepage and Mod Games category */
.jm-active body,
body.jm-active {
  background: var(--jm-bg);
  font-family: 'Inter', system-ui, sans-serif;
}

/* =============================================
   HIDE DEFAULT GENERATEPRESS HEADER / NAV
   on JashanMods pages — we render our own
============================================= */
.jm-active .site-header,
.jm-active .main-navigation,
.jm-active .site-footer {
  display: none !important;
}

/* Hide sidebar on our pages */
.jm-active .widget-area {
  display: none !important;
}

/* Full width content on our pages */
.jm-active .content-area,
.jm-active #primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

.jm-active .site-main,
.jm-active .entry-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* =============================================
   JM NAVBAR
============================================= */
#jm-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--jm-white);
  border-bottom: 2px solid var(--jm-red);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
#jm-nav .jm-logo {
  font-size: 15px;
  font-weight: 900;
  color: var(--jm-dark);
  letter-spacing: -0.5px;
  text-decoration: none;
  line-height: 1;
}
#jm-nav .jm-logo span { color: var(--jm-red); }


#jm-nav .jm-nav-icons { display: flex; gap: 8px; }
#jm-nav .jm-nav-icon {
  width: 32px; height: 32px;
  background: #f5f5f5;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  font-size: 16px; color: #555;
  text-decoration: none;
}

/* =============================================
   JM HERO BANNER
============================================= */
#jm-hero {
  background: var(--jm-dark) !important;
  background-image: none !important;
  padding: 32px 18px 26px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
#jm-hero .jm-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--jm-red);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
#jm-hero h1 {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}
#jm-hero h1 span { color: var(--jm-red); }
.jm-hero-btns { display: flex; gap: 10px; justify-content: center; }
.jm-hero-btn {
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 25px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  color: #fff;
  display: inline-block;
}
.jm-hero-btn.green { background: var(--jm-green); }
.jm-hero-btn.red   { background: var(--jm-red); }

/* =============================================
   STATS STRIP
============================================= */
#jm-stats {
  background: var(--jm-white);
  border-bottom: 1px solid var(--jm-border);
  padding: 14px 16px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.jm-stat { text-align: center; }
.jm-stat-num {
  font-size: 16px;
  font-weight: 900;
  color: var(--jm-red);
  display: block;
}
.jm-stat-label {
  font-size: 10px;
  color: var(--jm-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.jm-stat-divider {
  width: 1px;
  height: 30px;
  background: var(--jm-border);
}

/* =============================================
   SECTION HEADERS
============================================= */
.jm-section-header {
  padding: 18px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jm-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--jm-text);
}
.jm-view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--jm-red);
  text-decoration: none;
}

/* =============================================
   LATEST GAMES — 2-COL GRID
============================================= */
.jm-grid {
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.jm-card {
  background: var(--jm-white);
  border-radius: var(--jm-radius);
  overflow: hidden;
  border: 1px solid var(--jm-border);
  text-decoration: none;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.jm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.jm-card-thumb {
  position: relative;
  height: 100px;
  overflow: hidden;
  background: #1a2a3a;
}
.jm-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.jm-mod-badge {
  position: absolute;
  bottom: 7px; right: 7px;
  background: var(--jm-green);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.jm-card-body { padding: 9px; }
.jm-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--jm-text);
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jm-card-author {
  font-size: 10px;
  color: var(--jm-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.jm-stars { color: #f59e0b; font-size: 11px; }

/* =============================================
   NEW MODS — VERTICAL LIST
============================================= */
.jm-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.jm-list-card {
  background: var(--jm-white);
  border: 1px solid var(--jm-border);
  border-radius: var(--jm-radius);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  transition: transform 0.15s;
}
.jm-list-card:hover { transform: translateX(3px); }
.jm-list-thumb {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1e3a5f;
  display: flex; align-items: center; justify-content: center;
}
.jm-list-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.jm-new-badge {
  position: absolute;
  bottom: 3px; right: 3px;
  background: var(--jm-red);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
}
.jm-list-body { flex: 1; min-width: 0; }
.jm-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--jm-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jm-list-sub {
  font-size: 10px;
  color: var(--jm-muted);
  margin-bottom: 5px;
}
.jm-list-meta { display: flex; align-items: center; gap: 6px; }
.jm-mod-tag {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  color: #16a34a;
}
.jm-list-arrow { font-size: 16px; color: #ddd; flex-shrink: 0; }

/* =============================================
   LOAD MORE BUTTON
============================================= */
.jm-load-more {
  padding: 0 12px 20px;
}
.jm-load-more a {
  display: block;
  background: var(--jm-white);
  border: 1px solid var(--jm-border);
  border-radius: 10px;
  padding: 13px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--jm-red);
  text-decoration: none;
}

/* =============================================
   ABOUT JASHAN STRIP
============================================= */
#jm-about {
  background: var(--jm-white);
  border-top: 1px solid var(--jm-border);
  border-bottom: 1px solid var(--jm-border);
  padding: 20px 16px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}
.jm-about-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.jm-avatar {
  width: 46px; height: 46px;
  background: var(--jm-red);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; color: #fff;
  flex-shrink: 0;
}
.jm-about-name {
  font-size: 14px; font-weight: 800; color: var(--jm-text);
}
.jm-about-tagline {
  font-size: 11px; color: var(--jm-muted);
}
.jm-about-text {
  font-size: 12px; color: #777; line-height: 1.8;
}

/* =============================================
   SEARCH PAGE STYLES
============================================= */
#jm-search-wrap {
  padding: 20px 16px;
  max-width: 480px;
  margin: 0 auto;
}
.jm-search-title {
  font-size: 22px; font-weight: 900;
  color: var(--jm-text);
  margin-bottom: 16px;
}
.jm-search-box {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border: 1px solid var(--jm-border);
  border-radius: 50px;
  padding: 0 16px;
  margin-bottom: 20px;
}
.jm-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  padding: 13px 0;
  outline: none;
  font-family: inherit;
  color: var(--jm-text);
}
.jm-search-box button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #555;
  padding: 0;
}
.jm-search-hint {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 16px;
}
.jm-search-hint strong { color: var(--jm-text); }
.jm-found-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--jm-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* =============================================
   JM FOOTER
============================================= */
#jm-footer {
  background: var(--jm-dark);
  padding: 20px 16px;
  text-align: center;
}
.jm-footer-logo {
  font-size: 15px; font-weight: 900; color: #fff;
  margin-bottom: 3px;
}
.jm-footer-logo span { color: var(--jm-red); }
.jm-footer-tag {
  font-size: 10px; color: #555;
  margin-bottom: 10px;
}
.jm-footer-links {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 10px;
}
.jm-footer-links a {
  color: #555; font-size: 11px; text-decoration: none;
}
.jm-footer-copy { font-size: 10px; color: #444; }

/* =============================================
   RESPONSIVE — Desktop full-width like KillerMod
============================================= */
.jm-wrap {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  /* overflow-x: hidden removed — was blocking ad iframes/popups */
}

@media (min-width: 768px) {
  /* Wide centered container */
  .jm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* 4-column grid on desktop */
  .jm-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0;
  }

  /* Taller card thumbs on desktop */
  .jm-card-thumb { height: 140px; }

  /* Hero bigger on desktop */
  #jm-hero { padding: 60px 24px 50px; }
  #jm-hero h1 { font-size: 40px; }

  /* Navbar full width with max-width container */
  #jm-nav {
    padding: 0 32px;
    height: 60px;
  }
  #jm-nav .jm-logo { font-size: 20px; }

  /* Stats bar wider */
  #jm-stats { padding: 18px 32px; }
  .jm-stat-num { font-size: 20px; }

  /* Section headers */
  .jm-section-header { padding: 24px 0 12px; }
  .jm-section-title { font-size: 17px; }

  /* List cards wider */
  .jm-list { padding: 0; }
  .jm-load-more { padding: 0 0 24px; }

  /* Footer padding */
  #jm-footer { padding: 32px 24px; }
  #jm-about { padding: 32px 24px; }
}
