/*
 * Minepacks page-packs styles (Figma refresh)
 * Scope: page-packs center content only
 */

/* Global top background image (full width, includes sidebar area) */
body.mp-packs-template,
body.page-template-page-packs-php {
  position: relative;
  background-color: #ececec;
}

body.mp-packs-template::before,
body.page-template-page-packs-php::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 760px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.1) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(236, 236, 236, 0) 52%,
      rgba(236, 236, 236, 0.74) 80%,
      #ececec 100%
    ),
    url("https://minepacks.org/wp-content/uploads/2026/03/Lunar-Client-1.8.9-v2.17.3-2439-12-10-2024-12_45_26-1.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
}

/* Global lower background image (from categories area to footer, full width) */
body.mp-packs-template::after,
body.page-template-page-packs-php::after {
  content: none;
  display: none;
}

body.mp-packs-template #page,
body.mp-packs-template #content,
body.mp-packs-template .site-header,
body.mp-packs-template .site-content,
body.mp-packs-template .inside-site-info,
body.page-template-page-packs-php #page,
body.page-template-page-packs-php #content,
body.page-template-page-packs-php .site-header,
body.page-template-page-packs-php .site-content,
body.page-template-page-packs-php .inside-site-info {
  position: relative;
  z-index: 1;
}

body.mp-packs-template #page,
body.mp-packs-template #content,
body.mp-packs-template .site-content,
body.page-template-page-packs-php #page,
body.page-template-page-packs-php #content,
body.page-template-page-packs-php .site-content {
  background: transparent !important;
}

.mp-homepage,
.mp-homepage * {
  box-sizing: border-box;
}

.mp-homepage {
  --mp-border: #d8dde5;
  --mp-card-bg: #f4f5f7;
  --mp-text: #2a3140;
  --mp-muted: #6f7684;
  /* Reusable Minepacks shadows */
  --mp-card-shadow: 0 3px 0 rgba(146, 151, 160, 0.55), 0 10px 18px rgba(18, 28, 44, 0.09);
  --mp-card-shadow-hover: 0 4px 0 rgba(136, 142, 152, 0.62), 0 14px 24px rgba(18, 28, 44, 0.13);
  --mp-chip-shadow: 0 2px 0 rgba(148, 153, 162, 0.5), 0 7px 14px rgba(18, 28, 44, 0.08);
  --mp-chip-shadow-hover: 0 3px 0 rgba(139, 145, 156, 0.56), 0 10px 18px rgba(18, 28, 44, 0.11);
  --mp-shadow: var(--mp-card-shadow);
  --mp-soft-text-shadow: 0 1px 2px rgba(20, 28, 40, 0.2);
  width: 100%;
  max-width: 1206px;
  margin: 20px auto 58px;
  padding: 0 8px;
  color: var(--mp-text);
}

.mp-homepage a {
  color: inherit;
  text-decoration: none;
}

.mp-homepage section {
  margin-top: 56px;
}

/* Hero */
.mp-homepage .mp-home-hero {
  margin: 18px auto 0;
  max-width: 940px;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  overflow: visible;
  min-height: 0;
  box-shadow: none !important;
  background: transparent !important;
  background-image: none;
  outline: 0 !important;
}

.mp-homepage .mp-home-hero::before,
.mp-homepage .mp-home-hero::after {
  content: none;
  display: none;
}

.mp-homepage .mp-home-hero-inner {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px 8px;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mp-homepage .mp-home-hero-copy {
  max-width: 640px;
  text-align: center;
}

.mp-homepage .mp-home-hero-copy::before,
.mp-homepage .mp-home-hero-copy::after {
  content: none !important;
  display: none !important;
}

.mp-homepage .mp-home-hero-inner::before,
.mp-homepage .mp-home-hero-inner::after {
  content: none !important;
  display: none !important;
}

.mp-homepage .mp-home-hero,
.mp-homepage .mp-home-hero-inner,
.mp-homepage .mp-home-hero-copy {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.mp-homepage .mp-home-title {
  margin: 0;
  color: #20242d;
  font-size: clamp(2.25rem, 3.8vw, 2.95rem);
  line-height: 1.02;
  font-weight: 800;
  text-shadow: var(--mp-soft-text-shadow);
}

.mp-homepage .mp-home-description {
  margin: 20px auto 0;
  max-width: 735px;
  color: #6c788c;
  font-size: 1.04rem;
  line-height: 1.55;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(20, 28, 40, 0.14);
}

.mp-homepage .mp-home-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.mp-homepage .mp-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 1px solid #c5c9d2;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(12, 18, 30, 0.22);
}

.mp-homepage .mp-home-btn-primary {
  color: #5d6674;
  background: #d8dbe0;
  box-shadow: var(--mp-chip-shadow);
}

.mp-homepage .mp-home-btn-primary:hover {
  transform: translateY(-1px);
  background: #cfd4dc;
  box-shadow: var(--mp-chip-shadow-hover);
}

/* Hero CTA button: always medium/dark gray on hover */
.mp-homepage .mp-home-hero .mp-home-btn-primary {
  color: #ffffff;
  background: #20242d;
  border-color: #20242d;
  box-shadow: var(--mp-chip-shadow);
}

.mp-homepage .mp-home-hero .mp-home-btn-primary:hover,
.mp-homepage .mp-home-hero .mp-home-btn-primary:focus-visible {
  color: #ffffff;
  background: #161a22;
  border-color: #161a22;
  transform: translateY(-1px);
}

/* Shared heading */
.mp-homepage .mp-section-head {
  margin: 0 auto 18px;
  text-align: center;
}

.mp-homepage .mp-section-head h2 {
  margin: 0;
  color: #283041;
  font-size: clamp(1.72rem, 2.5vw, 2.15rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mp-homepage .mp-section-head p {
  margin: 8px auto 0;
  max-width: 860px;
  color: var(--mp-muted);
  font-size: 0.86rem;
  line-height: 1.52;
}

/* Category cards */
.mp-homepage .mp-home-categories {
  margin-top: 42px;
}

.mp-homepage .mp-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mp-homepage .mp-cat-card {
  border-radius: 22px;
  overflow: hidden;
  border: 0;
  background: var(--mp-card-bg);
  box-shadow: var(--mp-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-homepage .mp-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--mp-card-shadow-hover);
}

.mp-homepage .mp-cat-media {
  display: block;
  height: 200px;
  background: #b7cfee;
}

.mp-homepage .mp-cat-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-homepage .mp-cat-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 15px 16px;
}

.mp-homepage .mp-cat-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #8b93a2;
}

.mp-homepage .mp-cat-title {
  margin-top: 7px;
  color: #2f3746;
  font-size: 1.58rem;
  font-weight: 800;
  line-height: 1.05;
}

.mp-homepage .mp-cat-text {
  margin-top: 6px;
  color: #737c8b;
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Popular carousel */
.mp-homepage .mp-featured-carousel {
  margin: 22px 0 18px;
}

.mp-homepage .mp-featured-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 40px;
}

.mp-homepage .mp-featured-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #2b2f3a;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 800;
}

.mp-homepage .mp-featured-title .mp-lucide {
  color: #4bbb6f;
}

.mp-homepage .mp-featured-controls {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
}

.mp-homepage .mp-carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: #f2f2f2;
  color: #6b6b6b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--mp-chip-shadow);
  transition: all 0.2s ease;
}

.mp-homepage .mp-carousel-btn svg,
.mp-homepage .mp-carousel-btn .mp-lucide {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
}

.mp-homepage .mp-carousel-btn:hover {
  background: #e0e0e0;
  color: #3f3f3f;
  box-shadow: var(--mp-chip-shadow-hover);
  transform: translateY(-1px);
}

.mp-homepage .mp-icon-fallback {
  font-size: 1rem;
  font-weight: 700;
}

.mp-homepage .mp-carousel-viewport {
  overflow: hidden;
  position: relative;
  border-radius: 16px;
}

.mp-homepage .mp-carousel-track {
  display: flex;
  gap: 14px;
  padding: 6px 2px 10px;
  will-change: transform;
}

.mp-homepage .mp-carousel-card {
  flex: 0 0 auto;
  width: 220px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
  border-radius: 18px;
  overflow: hidden;
}

.mp-homepage .mp-carousel-card:hover {
  transform: scale(1.03);
}

.mp-homepage .mp-carousel-card:active {
  transform: scale(1.02);
}

.mp-homepage .mp-carousel-media {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--mp-card-shadow);
  height: auto;
}

.mp-homepage .mp-carousel-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.mp-homepage .mp-carousel-placeholder {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.06);
}

.mp-homepage .mp-carousel-text {
  padding-top: 10px;
  min-height: 44px;
  display: flex;
  align-items: flex-start;
}

.mp-homepage .mp-carousel-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-homepage .mp-carousel-stats {
  display: none !important;
}

/* Bedrock partner block */
.mp-homepage .mp-home-bedrock {
  margin-top: 24px;
}

.mp-homepage .mp-bedrock-box {
  position: relative;
  width: 100%;
  border-radius: 20px;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 247, 251, 0.96) 100%);
  box-shadow: var(--mp-card-shadow);
  padding: 20px 24px 18px;
  text-align: center;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mp-homepage .mp-bedrock-box:hover {
  box-shadow: var(--mp-card-shadow-hover);
  transform: translateY(-1px);
}

.mp-homepage .mp-bedrock-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 12%, rgba(140, 157, 182, 0.2), transparent 38%),
    radial-gradient(circle at 84% 88%, rgba(153, 167, 189, 0.14), transparent 36%);
}

.mp-homepage .mp-bedrock-content h3 {
  margin: 0;
  color: #242b39;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.mp-homepage .mp-bedrock-content p {
  margin: 7px auto 0;
  max-width: 760px;
  color: #48505f;
  font-size: 0.93rem;
  line-height: 1.52;
}

.mp-homepage .mp-bedrock-content {
  position: relative;
  z-index: 1;
}

.mp-homepage .mp-bedrock-link {
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  text-decoration: none;
}

.mp-homepage .mp-home-bedrock .mp-home-btn-primary {
  color: #ffffff;
  background: #20242d;
  border-color: #20242d;
  box-shadow: var(--mp-chip-shadow);
}

.mp-homepage .mp-home-bedrock .mp-home-btn-primary:hover,
.mp-homepage .mp-home-bedrock .mp-home-btn-primary:focus-visible {
  color: #ffffff;
  background: #161a22;
  border-color: #161a22;
  transform: translateY(-1px);
}

.mp-homepage .mp-home-bedrock + .mp-home-newpacks {
  margin-top: 36px;
}

/* Recent cards */
.mp-homepage .mp-home-newpacks {
  margin-top: 54px;
}

.mp-homepage .mp-new-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.mp-homepage .mp-new-card {
  background: #ffffff;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--mp-card-shadow);
  display: flex;
  flex-direction: column;
  transition: all 0.18s ease;
}

.mp-homepage .mp-new-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--mp-card-shadow-hover);
}

.mp-homepage .mp-new-thumb-link {
  display: block;
  aspect-ratio: 16 / 10;
  background: #eef2f7;
}

.mp-homepage .mp-new-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eef2f7;
}

.mp-homepage .mp-new-placeholder {
  width: 100%;
  height: 100%;
  background: #eef2f7;
}

.mp-homepage .mp-new-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 188px;
}

.mp-homepage .mp-new-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.34;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.34em * 2);
}

.mp-homepage .mp-new-title a {
  text-decoration: none;
  color: #111827;
}

.mp-homepage .mp-new-excerpt {
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.68;
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.68em * 3);
}

.mp-homepage .mp-new-stats {
  margin-top: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.mp-homepage .mp-new-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
}

.mp-homepage .mp-inline-link {
  display: inline-block;
  font-weight: 800;
  text-decoration: none;
}

/* Discord */
.mp-homepage .mp-home-discord {
  margin-top: 14px;
}

.mp-homepage .mp-discord-box {
  border-radius: 18px;
  border: 0;
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.62), transparent 42%),
    linear-gradient(100deg, #e4e8ee 0%, #dce2ea 38%, #9da6ff 70%, #6e75ff 100%);
  box-shadow: var(--mp-card-shadow);
  padding: 24px;
  display: block;
  text-align: left;
}

.mp-homepage .mp-discord-content h2 {
  margin: 0;
  color: #242b39;
  font-size: clamp(1.35rem, 2.35vw, 2.2rem);
  line-height: 1.12;
  font-weight: 800;
}

.mp-homepage .mp-discord-content p {
  margin: 8px 0 0;
  color: #48505f;
  font-size: 0.91rem;
  line-height: 1.55;
}

.mp-homepage .mp-discord-content .mp-home-btn {
  margin-top: 14px;
  min-height: 44px;
  padding: 11px 20px;
  color: #ffffff;
  border: 0;
  box-shadow: none;
  background: linear-gradient(135deg, #5072ff, #5458ea);
}

.mp-homepage .mp-discord-content .mp-home-btn:hover,
.mp-homepage .mp-discord-content .mp-home-btn:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #4569fb, #4a4fe0);
}

/* Hidden final CTA */
.mp-homepage .mp-home-bottom-cta {
  display: none;
}

/* Lucide icon sizing */
.mp-homepage svg.lucide,
.mp-homepage .mp-lucide svg,
.mp-homepage .mp-lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
}

.mp-homepage .mp-cat-icon-wrap svg.lucide,
.mp-homepage .mp-cat-icon-wrap .mp-lucide {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

/* Responsive */
@media (max-width: 1200px) {
  .mp-homepage .mp-cat-grid,
  .mp-homepage .mp-new-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp-homepage .mp-home-hero {
    min-height: 0;
    max-width: 900px;
  }

  .mp-homepage .mp-home-hero-inner {
    min-height: 0;
    padding: 16px 10px 8px;
  }
}

@media (max-width: 920px) {
  body.mp-packs-template::before,
  body.page-template-page-packs-php::before {
    height: 620px;
  }

  .mp-homepage {
    padding: 0 3px;
  }

  .mp-homepage section {
    margin-top: 44px;
  }

  .mp-homepage .mp-discord-box {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .mp-homepage .mp-featured-head {
    align-items: center;
    flex-direction: column;
    min-height: 0;
  }

  .mp-homepage .mp-featured-controls {
    position: static;
    transform: none;
  }

  .mp-homepage .mp-carousel-card {
    width: 180px;
  }

  .mp-homepage .mp-carousel-img {
    height: 120px;
  }
}

@media (max-width: 700px) {
  body.mp-packs-template::before,
  body.page-template-page-packs-php::before {
    height: 500px;
  }

  .mp-homepage section {
    margin-top: 32px;
  }

  .mp-homepage .mp-home-hero {
    min-height: 0;
    max-width: none;
  }

  .mp-homepage .mp-home-hero-inner {
    min-height: 0;
    padding: 14px 8px 6px;
  }

  .mp-homepage .mp-home-description {
    font-size: 0.94rem;
  }

  .mp-homepage .mp-home-btn {
    min-height: 42px;
    font-size: 0.95rem;
  }

  .mp-homepage .mp-cat-grid,
  .mp-homepage .mp-new-grid {
    grid-template-columns: 1fr;
  }

  .mp-homepage .mp-cat-title {
    font-size: 2rem;
  }

  .mp-homepage .mp-bedrock-box {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .mp-homepage .mp-bedrock-link {
    min-height: 40px;
    padding: 9px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .mp-homepage {
    margin-top: 14px;
    margin-bottom: 38px;
    padding: 0 2px;
  }

  .mp-homepage .mp-home-hero {
    border-radius: 0;
  }

  .mp-homepage .mp-home-hero-inner {
    padding: 12px 8px 6px;
  }

  .mp-homepage .mp-home-title {
    font-size: clamp(1.75rem, 7.2vw, 2.3rem);
  }

  .mp-homepage .mp-home-description {
    margin-top: 14px;
    font-size: 0.9rem;
    line-height: 1.48;
  }

  .mp-homepage .mp-home-btn {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .mp-homepage .mp-new-body {
    padding: 14px;
    min-height: 0;
  }
}

/* 3) Packs layout: hide sidebar and keep content centered */
body.mp-packs-template #right-sidebar,
body.page-template-page-packs-php #right-sidebar,
body.mp-packs-template #secondary,
body.page-template-page-packs-php #secondary,
body.mp-packs-template .sidebar,
body.page-template-page-packs-php .sidebar {
  display: none !important;
  margin-left: 0 !important;
}

body.mp-packs-template #primary,
body.page-template-page-packs-php #primary,
body.mp-packs-template .content-area,
body.page-template-page-packs-php .content-area {
  float: none !important;
  width: 100% !important;
  max-width: 1206px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.mp-packs-template .site-main,
body.page-template-page-packs-php .site-main {
  width: 100% !important;
}

body.mp-packs-template .inside-article,
body.page-template-page-packs-php .inside-article {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.mp-packs-template #content,
body.page-template-page-packs-php #content {
  overflow-x: clip;
}

body.mp-packs-template,
body.page-template-page-packs-php {
  overflow-x: hidden;
}

body.mp-packs-template .centered-container.mp-homepage,
body.page-template-page-packs-php .centered-container.mp-homepage {
  max-width: 1206px !important;
  width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

/* Cache-friendly layout classes used by template (replaces inline styles) */
.mp-packs-content {
  width: 100%;
  max-width: 1206px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.mp-packs-primary {
  float: none !important;
  clear: both;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.mp-packs-main {
  width: 100%;
}

/* 3.1) Remove white container border/background from theme wrapper */
body.mp-packs-template .inside-article,
body.page-template-page-packs-php .inside-article {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 1200px) {
  body.mp-packs-template::after,
  body.page-template-page-packs-php::after {
    top: 600px;
  }
}

@media (max-width: 920px) {
  body.mp-packs-template::after,
  body.page-template-page-packs-php::after {
    top: 560px;
    background-size: auto 100%;
    background-position: center top;
  }
}

@media (max-width: 700px) {
  body.mp-packs-template::after,
  body.page-template-page-packs-php::after {
    top: 520px;
    opacity: 0.9;
  }
}
