/*
Theme Name: MelonModHub
Theme URI: https://melonmodhub.com/
Author: MelonModHub
Author URI: https://melonmodhub.com/
Description: Fast, SEO-optimized theme for a Melon Sandbox / Melon Playground mods website. Includes a built-in Mods catalog (custom post type), install-guide support, schema.org structured data for Google and AI assistants, and a clean melon-themed design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: melonmodhub
Tags: gaming, blog, custom-post-type, seo, fast, one-column, two-columns, custom-menu, featured-images
*/

:root {
  /* Melon brand palette */
  --mmh-green: #43b02a;        /* melon rind green */
  --mmh-green-dark: #2f7d1e;
  --mmh-green-light: #6fce57;
  --mmh-pink: #f0567a;         /* melon flesh */
  --mmh-pink-soft: #ffd7e0;
  --mmh-seed: #3a2a1a;
  --mmh-bg: #f7faf5;
  --mmh-surface: #ffffff;
  --mmh-ink: #1c2419;
  --mmh-muted: #5d6b58;
  --mmh-border: #e2ecdd;
  --mmh-radius: 14px;
  --mmh-shadow: 0 4px 18px rgba(30, 60, 20, 0.08);
  --mmh-maxw: 1160px;
  --mmh-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--mmh-font);
  color: var(--mmh-ink);
  background: var(--mmh-bg);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--mmh-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.mmh-container { max-width: var(--mmh-maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.mmh-header {
  background: var(--mmh-surface);
  border-bottom: 1px solid var(--mmh-border);
  position: sticky; top: 0; z-index: 50;
}
.mmh-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; }
.mmh-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--mmh-ink); }
.mmh-logo:hover { text-decoration: none; }
.mmh-logo-badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--mmh-green-light), var(--mmh-green) 70%);
  display: inline-block; position: relative; box-shadow: inset -3px -4px 0 rgba(0,0,0,.08);
}
.mmh-logo-badge::after { content:""; position:absolute; inset:9px; border-radius:50%; background: var(--mmh-pink); }
.mmh-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.mmh-nav a { color: var(--mmh-ink); font-weight: 600; }
.mmh-search { display: flex; gap: 6px; }
.mmh-search input { padding: 8px 12px; border: 1px solid var(--mmh-border); border-radius: 999px; font-size: .95rem; }

/* ---------- Buttons ---------- */
.mmh-btn {
  display: inline-block; background: var(--mmh-green); color: #fff !important;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; border: none; cursor: pointer;
  transition: transform .08s ease, background .2s ease;
}
.mmh-btn:hover { background: var(--mmh-green-dark); text-decoration: none; transform: translateY(-1px); }
.mmh-btn--pink { background: var(--mmh-pink); }
.mmh-btn--pink:hover { background: #d63e63; }
.mmh-btn--lg { padding: 16px 32px; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.mmh-hero {
  background: linear-gradient(135deg, #eafbe4 0%, #ffe9ef 100%);
  padding: 64px 0; text-align: center;
}
.mmh-hero h1 { font-size: 2.6rem; margin: 0 0 12px; line-height: 1.15; }
.mmh-hero p { font-size: 1.2rem; color: var(--mmh-muted); max-width: 640px; margin: 0 auto 26px; }

/* ---------- Grid of mods ---------- */
.mmh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; margin: 34px 0; }
.mmh-card {
  background: var(--mmh-surface); border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius); overflow: hidden; box-shadow: var(--mmh-shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex; flex-direction: column;
}
.mmh-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(30,60,20,.16); }
.mmh-card-thumb { position: relative; aspect-ratio: 1/1; background: #eef4ea; overflow: hidden; display: block; }
.mmh-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mmh-card:hover .mmh-card-thumb img { transform: scale(1.05); }
/* category badge over the image */
.mmh-card-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(67,176,42,.92); color: #fff; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(2px);
}
.mmh-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mmh-card-title { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 700; }
.mmh-card-title a { color: var(--mmh-ink); }
.mmh-card-title a:hover { color: var(--mmh-green-dark); text-decoration: none; }
.mmh-card-meta { font-size: .8rem; color: var(--mmh-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mmh-card-author { font-style: italic; }
.mmh-card-rating { color: #e8a400; font-weight: 700; }
.mmh-card-dl {
  margin-top: auto; align-self: flex-start;
  background: var(--mmh-green); color: #fff; font-weight: 700; font-size: .82rem;
  padding: 6px 14px; border-radius: 999px;
}
.mmh-card:hover .mmh-card-dl { background: var(--mmh-green-dark); }

/* ---------- Sections ---------- */
.mmh-section { padding: 40px 0; }
.mmh-section h2 { font-size: 1.8rem; margin: 0 0 6px; }
.mmh-section-lead { color: var(--mmh-muted); margin: 0 0 10px; }
.mmh-cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.mmh-chip { background: #fff; border: 1px solid var(--mmh-border); border-radius: 999px; padding: 8px 16px; font-weight: 600; color: var(--mmh-ink); }
.mmh-chip:hover { border-color: var(--mmh-green); color: var(--mmh-green-dark); text-decoration: none; }

/* ---------- Single mod ---------- */
.mmh-single { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; padding: 36px 0; }
.mmh-single-media img { border-radius: var(--mmh-radius); border: 1px solid var(--mmh-border); }
.mmh-download-box { background: #fff; border: 2px solid var(--mmh-green-light); border-radius: var(--mmh-radius); padding: 22px; position: sticky; top: 84px; }
.mmh-download-box h3 { margin-top: 0; }
.mmh-meta-list { list-style: none; padding: 0; margin: 0 0 16px; font-size: .95rem; }
.mmh-meta-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--mmh-border); }
.mmh-safe { display: inline-flex; align-items: center; gap: 6px; color: var(--mmh-green-dark); font-weight: 700; font-size: .9rem; }

/* ---------- Install steps ---------- */
.mmh-steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0; }
.mmh-steps li { position: relative; padding: 12px 12px 12px 52px; margin-bottom: 12px; background:#fff; border:1px solid var(--mmh-border); border-radius: 10px; }
.mmh-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--mmh-green); color: #fff; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Footer ---------- */
.mmh-footer { background: var(--mmh-seed); color: #d8e4d2; margin-top: 50px; padding: 40px 0 24px; }
.mmh-footer a { color: #cfe8c5; }
.mmh-footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.mmh-footer h4 { color: #fff; margin: 0 0 10px; }
.mmh-footer ul { list-style: none; padding: 0; margin: 0; }
.mmh-footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; font-size: .85rem; color: #a9baa2; text-align: center; }

/* ---------- Content / posts ---------- */
.mmh-content { max-width: 780px; margin: 0 auto; padding: 36px 20px; }
.mmh-content h1 { font-size: 2.2rem; }
.mmh-post-meta { color: var(--mmh-muted); font-size: .9rem; margin-bottom: 20px; }
.mmh-faq { margin: 26px 0; }
.mmh-faq details { background:#fff; border:1px solid var(--mmh-border); border-radius:10px; padding:14px 18px; margin-bottom:10px; }
.mmh-faq summary { font-weight: 700; cursor: pointer; }

/* ---------- Pagination ---------- */
.mmh-pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.mmh-pagination .page-numbers { padding: 9px 15px; border:1px solid var(--mmh-border); border-radius: 8px; background:#fff; }
.mmh-pagination .current { background: var(--mmh-green); color:#fff; border-color: var(--mmh-green); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .mmh-single { grid-template-columns: 1fr; }
  .mmh-footer-cols { grid-template-columns: 1fr; }
  .mmh-nav { display: none; }
  .mmh-hero h1 { font-size: 2rem; }
}
